mirror of https://github.com/nextcloud/calendar
feat(dashboard): reload widget once every 10 minutes
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
279088248d
commit
af94950cbd
|
@ -27,12 +27,13 @@ declare(strict_types=1);
|
||||||
namespace OCA\Calendar\Dashboard;
|
namespace OCA\Calendar\Dashboard;
|
||||||
|
|
||||||
use OCP\Dashboard\IAPIWidgetV2;
|
use OCP\Dashboard\IAPIWidgetV2;
|
||||||
|
use OCP\Dashboard\IReloadableWidget;
|
||||||
use OCP\Dashboard\Model\WidgetItems;
|
use OCP\Dashboard\Model\WidgetItems;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requires Nextcloud >= 27.1.0
|
* Requires Nextcloud >= 27.1.0
|
||||||
*/
|
*/
|
||||||
class CalendarWidgetV2 extends CalendarWidget implements IAPIWidgetV2 {
|
class CalendarWidgetV2 extends CalendarWidget implements IAPIWidgetV2, IReloadableWidget {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
|
@ -68,4 +69,11 @@ class CalendarWidgetV2 extends CalendarWidget implements IAPIWidgetV2 {
|
||||||
public function getIconClass(): string {
|
public function getIconClass(): string {
|
||||||
return 'icon-calendar-dark';
|
return 'icon-calendar-dark';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function getReloadInterval(): int {
|
||||||
|
return 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue