MOBILE-3656 course: Always use the icons defined in CoreConstants

main
Dani Palou 2021-04-08 11:13:17 +02:00
parent d222ca6882
commit ae3339ac7d
2 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // 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 { Component, OnDestroy, ViewChild, OnInit, AfterViewInit, ElementRef, Optional } from '@angular/core';
import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { CoreSplitViewComponent } from '@components/split-view/split-view';
import { CoreFileUploader } from '@features/fileuploader/services/fileuploader'; import { CoreFileUploader } from '@features/fileuploader/services/fileuploader';
@ -88,8 +88,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes
isprivatereply: false, isprivatereply: false,
}; };
refreshIcon = 'spinner'; refreshIcon = CoreConstants.ICON_LOADING;
syncIcon = 'spinner'; syncIcon = CoreConstants.ICON_LOADING;
discussionStr = ''; discussionStr = '';
component = AddonModForumProvider.COMPONENT; component = AddonModForumProvider.COMPONENT;
cmId!: number; cmId!: number;
@ -509,8 +509,8 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes
CoreDomUtils.showErrorModal(error); CoreDomUtils.showErrorModal(error);
} finally { } finally {
this.discussionLoaded = true; this.discussionLoaded = true;
this.refreshIcon = 'refresh'; this.refreshIcon = CoreConstants.ICON_REFRESH;
this.syncIcon = 'sync'; this.syncIcon = CoreConstants.ICON_SYNC;
if (forceMarkAsRead || (hasUnreadPosts && this.trackPosts)) { if (forceMarkAsRead || (hasUnreadPosts && this.trackPosts)) {
// // Add log in Moodle and mark unread posts as readed. // // 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<void> { refreshPosts(sync?: boolean, showErrors?: boolean): Promise<void> {
this.content.scrollToTop(); this.content.scrollToTop();
this.refreshIcon = 'spinner'; this.refreshIcon = CoreConstants.ICON_LOADING;
this.syncIcon = 'spinner'; this.syncIcon = CoreConstants.ICON_LOADING;
const promises = [ const promises = [
AddonModForum.invalidateForumData(this.courseId), AddonModForum.invalidateForumData(this.courseId),

View File

@ -79,7 +79,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C
* Component being initialized. * Component being initialized.
*/ */
ngOnInit(): void { ngOnInit(): void {
this.refreshIcon = 'spinner'; this.refreshIcon = CoreConstants.ICON_LOADING;
if (!this.module) { if (!this.module) {
return; return;