diff --git a/src/addons/mod/forum/components/index/index.ts b/src/addons/mod/forum/components/index/index.ts index 0e2d8eb69..071a24b46 100644 --- a/src/addons/mod/forum/components/index/index.ts +++ b/src/addons/mod/forum/components/index/index.ts @@ -162,6 +162,8 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom }); } }); + + // @todo Listen for offline ratings saved and synced. } async ngAfterViewInit(): Promise { @@ -219,6 +221,7 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom await Promise.all([ this.fetchOfflineDiscussions(), this.fetchDiscussions(refresh), + // @todo fetch hasOfflineRatings. ]); } catch (error) { if (refresh) { diff --git a/src/addons/mod/forum/components/post/post.html b/src/addons/mod/forum/components/post/post.html index 77d4581a7..4848208cd 100644 --- a/src/addons/mod/forum/components/post/post.html +++ b/src/addons/mod/forum/components/post/post.html @@ -71,6 +71,16 @@ + + diff --git a/src/addons/mod/forum/pages/discussion/discussion.page.ts b/src/addons/mod/forum/pages/discussion/discussion.page.ts index d6bf7a2d2..d36221650 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.page.ts +++ b/src/addons/mod/forum/pages/discussion/discussion.page.ts @@ -194,6 +194,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes AddonModForum.instance.invalidateDiscussionsList(this.forumId); } + // @todo Listen for offline ratings saved and synced. + this.changeDiscObserver = CoreEvents.on(AddonModForumProvider.CHANGE_DISCUSSION_EVENT, (data: any) => { if ((this.forumId && this.forumId === data.forumId) || data.cmId === this.cmId) { AddonModForum.instance.invalidateDiscussionsList(this.forumId).finally(() => { @@ -476,6 +478,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes } else { this.canPin = false; } + + // @todo fetch hasOfflineRatings. } catch (error) { CoreDomUtils.instance.showErrorModal(error); } finally {