diff --git a/appinfo/info.xml b/appinfo/info.xml index ee45c4b4a..5fe85472d 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -26,7 +26,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www https://github.com/nextcloud/notes.git https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png - + diff --git a/lib/AppInfo/DashboardWidget.php b/lib/AppInfo/DashboardWidget.php index d9d95d4fc..2c5866866 100644 --- a/lib/AppInfo/DashboardWidget.php +++ b/lib/AppInfo/DashboardWidget.php @@ -98,7 +98,7 @@ public function getWidgetButtons(string $userId): array { public function getItems(string $userId, ?string $since = null, int $limit = 7): array { $notes = $this->notesService->getTopNotes($userId); $notes = array_slice($notes, 0, $limit); - return array_map(function (Note $note) { + return array_values(array_map(function (Note $note): WidgetItem { $excerpt = ''; try { $excerpt = $note->getExcerpt(); @@ -109,7 +109,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7): ? $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg')) : $this->getIconUrl(); return new WidgetItem($note->getTitle(), $excerpt, $link, $icon, (string)$note->getModified()); - }, $notes); + }, $notes)); } public function getIconUrl(): string { diff --git a/lib/Service/TagService.php b/lib/Service/TagService.php index 6b78e0ad7..54d975221 100644 --- a/lib/Service/TagService.php +++ b/lib/Service/TagService.php @@ -20,6 +20,10 @@ public function __construct(ITagManager $tagManager) { $this->tagger = $tagManager->load('files'); } + /** + * @param list $fileIds + * @return void + */ public function loadTags(array $fileIds) : void { $this->cachedTags = $this->tagger->getTagsForObjects($fileIds); }