From cb50d9461d62d26ffba334d87269b6285d3fd796 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 28 Jun 2021 17:46:21 +0200 Subject: [PATCH] MOBILE-3320 folder: Fix refresh menu item --- .../folder/components/index/addon-mod-folder-index.html | 8 ++++---- src/addons/mod/folder/components/index/index.ts | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/addons/mod/folder/components/index/addon-mod-folder-index.html b/src/addons/mod/folder/components/index/addon-mod-folder-index.html index 1cc40e3d6..17b256dea 100644 --- a/src/addons/mod/folder/components/index/addon-mod-folder-index.html +++ b/src/addons/mod/folder/components/index/addon-mod-folder-index.html @@ -34,8 +34,8 @@ contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId"> - - + + @@ -43,12 +43,12 @@ - + - diff --git a/src/addons/mod/folder/components/index/index.ts b/src/addons/mod/folder/components/index/index.ts index 10150ae14..a74ee7819 100644 --- a/src/addons/mod/folder/components/index/index.ts +++ b/src/addons/mod/folder/components/index/index.ts @@ -42,6 +42,7 @@ export class AddonModFolderIndexComponent extends CoreCourseModuleMainResourceCo component = AddonModFolderProvider.COMPONENT; canGetFolder = false; + contents?: AddonModFolderFolderFormattedData; constructor(@Optional() courseContentsPage?: CoreCourseContentsPage) { super('AddonModFolderIndexComponent', courseContentsPage); @@ -57,6 +58,7 @@ export class AddonModFolderIndexComponent extends CoreCourseModuleMainResourceCo if (this.subfolder) { this.description = this.folderInstance ? this.folderInstance.intro : this.module.description; + this.contents = this.subfolder; this.loaded = true; this.refreshIcon = CoreConstants.ICON_REFRESH; @@ -112,7 +114,7 @@ export class AddonModFolderIndexComponent extends CoreCourseModuleMainResourceCo this.dataRetrieved.emit(this.folderInstance || this.module); this.description = this.folderInstance ? this.folderInstance.intro : this.module.description; - this.subfolder = AddonModFolderHelper.formatContents(this.module.contents); + this.contents = AddonModFolderHelper.formatContents(this.module.contents); } finally { this.fillContextMenu(refresh); }