From ae3339ac7d3cd82e7df19af0c3c540c68b5f66dd Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Thu, 8 Apr 2021 11:13:17 +0200 Subject: [PATCH] MOBILE-3656 course: Always use the icons defined in CoreConstants --- .../mod/forum/pages/discussion/discussion.page.ts | 14 +++++++------- .../components/module-index/module-index.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/addons/mod/forum/pages/discussion/discussion.page.ts b/src/addons/mod/forum/pages/discussion/discussion.page.ts index 1f04eef18..edf8d9fdd 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.page.ts +++ b/src/addons/mod/forum/pages/discussion/discussion.page.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { ContextLevel } from '@/core/constants'; +import { ContextLevel, CoreConstants } from '@/core/constants'; import { Component, OnDestroy, ViewChild, OnInit, AfterViewInit, ElementRef, Optional } from '@angular/core'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { CoreFileUploader } from '@features/fileuploader/services/fileuploader'; @@ -88,8 +88,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes isprivatereply: false, }; - refreshIcon = 'spinner'; - syncIcon = 'spinner'; + refreshIcon = CoreConstants.ICON_LOADING; + syncIcon = CoreConstants.ICON_LOADING; discussionStr = ''; component = AddonModForumProvider.COMPONENT; cmId!: number; @@ -509,8 +509,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes CoreDomUtils.showErrorModal(error); } finally { this.discussionLoaded = true; - this.refreshIcon = 'refresh'; - this.syncIcon = 'sync'; + this.refreshIcon = CoreConstants.ICON_REFRESH; + this.syncIcon = CoreConstants.ICON_SYNC; if (forceMarkAsRead || (hasUnreadPosts && this.trackPosts)) { // // Add log in Moodle and mark unread posts as readed. @@ -630,8 +630,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes */ refreshPosts(sync?: boolean, showErrors?: boolean): Promise { this.content.scrollToTop(); - this.refreshIcon = 'spinner'; - this.syncIcon = 'spinner'; + this.refreshIcon = CoreConstants.ICON_LOADING; + this.syncIcon = CoreConstants.ICON_LOADING; const promises = [ AddonModForum.invalidateForumData(this.courseId), diff --git a/src/core/features/siteplugins/components/module-index/module-index.ts b/src/core/features/siteplugins/components/module-index/module-index.ts index c3d5c322d..40061f0ec 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -79,7 +79,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C * Component being initialized. */ ngOnInit(): void { - this.refreshIcon = 'spinner'; + this.refreshIcon = CoreConstants.ICON_LOADING; if (!this.module) { return;