diff --git a/src/addons/badges/pages/issued-badge/issued-badge.ts b/src/addons/badges/pages/issued-badge/issued-badge.ts index 1440e7f02..640b75e5e 100644 --- a/src/addons/badges/pages/issued-badge/issued-badge.ts +++ b/src/addons/badges/pages/issued-badge/issued-badge.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreTimeUtils } from '@services/utils/time'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreSites } from '@services/sites'; @@ -130,7 +129,7 @@ export class AddonBadgesIssuedBadgePage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - async refreshBadges(refresher?: IonRefresher): Promise { + async refreshBadges(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(Promise.all([ AddonBadges.invalidateUserBadges(this.courseId, this.userId), ])); diff --git a/src/addons/badges/pages/user-badges/user-badges.ts b/src/addons/badges/pages/user-badges/user-badges.ts index 9d02a2c5f..eab870748 100644 --- a/src/addons/badges/pages/user-badges/user-badges.ts +++ b/src/addons/badges/pages/user-badges/user-badges.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { AddonBadges, AddonBadgesUserBadge } from '../../services/badges'; import { CoreTimeUtils } from '@services/utils/time'; import { CoreDomUtils } from '@services/utils/dom'; @@ -90,7 +89,7 @@ export class AddonBadgesUserBadgesPage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - async refreshBadges(refresher?: IonRefresher): Promise { + async refreshBadges(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors( AddonBadges.invalidateUserBadges( this.badges.getSource().COURSE_ID, diff --git a/src/addons/block/myoverview/components/myoverview/myoverview.ts b/src/addons/block/myoverview/components/myoverview/myoverview.ts index bbf812037..efe60ab14 100644 --- a/src/addons/block/myoverview/components/myoverview/myoverview.ts +++ b/src/addons/block/myoverview/components/myoverview/myoverview.ts @@ -31,7 +31,7 @@ import { CoreUtils } from '@services/utils/utils'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { AddonCourseCompletion } from '@addons/coursecompletion/services/coursecompletion'; -import { IonRefresher, IonSearchbar } from '@ionic/angular'; +import { IonSearchbar } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { PageLoadWatcher } from '@classes/page-load-watcher'; import { PageLoadsManager } from '@classes/page-loads-manager'; @@ -191,7 +191,7 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem * @param done Function to call when done. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void): Promise { if (this.loaded) { return this.refreshContent().finally(() => { refresher?.complete(); diff --git a/src/addons/blog/pages/entries/entries.ts b/src/addons/blog/pages/entries/entries.ts index b5ee60335..a570d0786 100644 --- a/src/addons/blog/pages/entries/entries.ts +++ b/src/addons/blog/pages/entries/entries.ts @@ -19,7 +19,6 @@ import { CoreComments } from '@features/comments/services/comments'; import { CoreMainMenuDeepLinkManager } from '@features/mainmenu/classes/deep-link-manager'; import { CoreTag } from '@features/tag/services/tag'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; @@ -272,7 +271,7 @@ export class AddonBlogEntriesPage implements OnInit { * * @param refresher Refresher instance. */ - refresh(refresher?: IonRefresher): void { + refresh(refresher?: HTMLIonRefresherElement): void { const promises = this.entries.map((entry) => CoreComments.invalidateCommentsData('user', entry.userid, this.component, entry.id, 'format_blog')); diff --git a/src/addons/calendar/pages/day/day.ts b/src/addons/calendar/pages/day/day.ts index 1f539005c..83c8e41a8 100644 --- a/src/addons/calendar/pages/day/day.ts +++ b/src/addons/calendar/pages/day/day.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; @@ -301,7 +300,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy { * @param done Function to call when done. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void): Promise { if (!this.loaded) { return; } diff --git a/src/addons/calendar/pages/edit-event/edit-event.ts b/src/addons/calendar/pages/edit-event/edit-event.ts index a6dd52dd0..993603f9e 100644 --- a/src/addons/calendar/pages/edit-event/edit-event.ts +++ b/src/addons/calendar/pages/edit-event/edit-event.ts @@ -14,7 +14,6 @@ import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms'; -import { IonRefresher } from '@ionic/angular'; import { CoreEvents } from '@singletons/events'; import { CoreGroup, CoreGroups } from '@services/groups'; import { CoreSites } from '@services/sites'; @@ -383,7 +382,7 @@ export class AddonCalendarEditEventPage implements OnInit, OnDestroy, CanLeave { * * @param refresher Refresher. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { const promises = [ AddonCalendar.invalidateAccessInformation(this.courseId), AddonCalendar.invalidateAllowedEventTypes(this.courseId), diff --git a/src/addons/calendar/pages/event/event.ts b/src/addons/calendar/pages/event/event.ts index 59b6eb622..3aedbbeb8 100644 --- a/src/addons/calendar/pages/event/event.ts +++ b/src/addons/calendar/pages/event/event.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { AlertOptions } from '@ionic/core'; import { AddonCalendar, @@ -419,7 +418,7 @@ export class AddonCalendarEventPage implements OnInit, OnDestroy { * @param showErrors Whether to show sync errors to the user. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void, showErrors= false): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void, showErrors= false): Promise { if (!this.eventLoaded) { return; } diff --git a/src/addons/calendar/pages/index/index.ts b/src/addons/calendar/pages/index/index.ts index cd48d82d1..ac6828c74 100644 --- a/src/addons/calendar/pages/index/index.ts +++ b/src/addons/calendar/pages/index/index.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; @@ -263,7 +262,7 @@ export class AddonCalendarIndexPage implements OnInit, OnDestroy { * @param showErrors Whether to show sync errors to the user. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void, showErrors?: boolean): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void, showErrors?: boolean): Promise { if (!this.loaded) { return; } diff --git a/src/addons/competency/pages/competencies/competencies.page.ts b/src/addons/competency/pages/competencies/competencies.page.ts index 170976e19..9a3f1750b 100644 --- a/src/addons/competency/pages/competencies/competencies.page.ts +++ b/src/addons/competency/pages/competencies/competencies.page.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { @@ -121,7 +120,7 @@ export class AddonCompetencyCompetenciesPage implements AfterViewInit, OnDestroy * * @param refresher Refresher. */ - async refreshCompetencies(refresher?: IonRefresher): Promise { + async refreshCompetencies(refresher?: HTMLIonRefresherElement): Promise { await this.competencies.getSource().invalidateCache(); this.competencies.getSource().setDirty(true); diff --git a/src/addons/competency/pages/competency/competency.page.ts b/src/addons/competency/pages/competency/competency.page.ts index bf14914ac..9431a03e9 100644 --- a/src/addons/competency/pages/competency/competency.page.ts +++ b/src/addons/competency/pages/competency/competency.page.ts @@ -30,7 +30,6 @@ import { AddonCompetencyProvider, } from '@addons/competency/services/competency'; import { CoreNavigator } from '@services/navigator'; -import { IonRefresher } from '@ionic/angular'; import { ContextLevel } from '@/core/constants'; import { CoreUtils } from '@services/utils/utils'; import { ADDON_COMPETENCY_SUMMARY_PAGE } from '@addons/competency/competency.module'; @@ -173,7 +172,7 @@ export class AddonCompetencyCompetencyPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - async refreshCompetency(refresher: IonRefresher): Promise { + async refreshCompetency(refresher: HTMLIonRefresherElement): Promise { const source = this.competencies.getSource(); await CoreUtils.ignoreErrors( diff --git a/src/addons/competency/pages/competencysummary/competencysummary.page.ts b/src/addons/competency/pages/competencysummary/competencysummary.page.ts index 1495a9e6e..00dd18b0c 100644 --- a/src/addons/competency/pages/competencysummary/competencysummary.page.ts +++ b/src/addons/competency/pages/competencysummary/competencysummary.page.ts @@ -15,7 +15,6 @@ import { Component, OnInit } from '@angular/core'; import { ContextLevel } from '@/core/constants'; import { AddonCompetencySummary, AddonCompetency } from '@addons/competency/services/competency'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -113,7 +112,7 @@ export class AddonCompetencyCompetencySummaryPage implements OnInit { * * @param refresher Refresher. */ - refreshCompetency(refresher: IonRefresher): void { + refreshCompetency(refresher: HTMLIonRefresherElement): void { AddonCompetency.invalidateCompetencySummary(this.competencyId).finally(() => { this.fetchCompetency().finally(() => { refresher?.complete(); diff --git a/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts b/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts index cf780f27d..665842828 100644 --- a/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts +++ b/src/addons/competency/pages/coursecompetencies/coursecompetencies.page.ts @@ -18,7 +18,6 @@ import { AddonCompetencyDataForCourseCompetenciesPageCompetency, } from '@addons/competency/services/competency'; import { CoreUserProfile } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { ContextLevel } from '@/core/constants'; @@ -148,7 +147,7 @@ export class AddonCompetencyCourseCompetenciesPage implements OnInit, OnDestroy * * @param refresher Refresher. */ - async refreshCourseCompetencies(refresher?: IonRefresher): Promise { + async refreshCourseCompetencies(refresher?: HTMLIonRefresherElement): Promise { await this.competencies.getSource().invalidateCache(); this.fetchCourseCompetencies().finally(() => { diff --git a/src/addons/competency/pages/plan/plan.ts b/src/addons/competency/pages/plan/plan.ts index 5c57a659b..9f1d1f540 100644 --- a/src/addons/competency/pages/plan/plan.ts +++ b/src/addons/competency/pages/plan/plan.ts @@ -17,7 +17,6 @@ import { CoreDomUtils } from '@services/utils/dom'; import { AddonCompetencyDataForPlanPageCompetency, AddonCompetencyDataForPlanPageWSResponse } from '../../services/competency'; import { CoreNavigator } from '@services/navigator'; import { CoreUserProfile } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreSwipeNavigationItemsManager } from '@classes/items-management/swipe-navigation-items-manager'; import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { AddonCompetencyPlansSource } from '@addons/competency/classes/competency-plans-source'; @@ -111,7 +110,7 @@ export class AddonCompetencyPlanPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - async refreshLearningPlan(refresher: IonRefresher): Promise { + async refreshLearningPlan(refresher: HTMLIonRefresherElement): Promise { await this.competencies.getSource().invalidateCache(); this.fetchLearningPlan().finally(() => { diff --git a/src/addons/competency/pages/planlist/planlist.ts b/src/addons/competency/pages/planlist/planlist.ts index db2030b98..c725a372c 100644 --- a/src/addons/competency/pages/planlist/planlist.ts +++ b/src/addons/competency/pages/planlist/planlist.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { CoreNavigator } from '@services/navigator'; @@ -86,7 +85,7 @@ export class AddonCompetencyPlanListPage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - async refreshLearningPlans(refresher: IonRefresher): Promise { + async refreshLearningPlans(refresher: HTMLIonRefresherElement): Promise { await this.plans.getSource().invalidateCache(); this.plans.getSource().setDirty(true); diff --git a/src/addons/coursecompletion/pages/report/report.ts b/src/addons/coursecompletion/pages/report/report.ts index b58921aa3..6449ec701 100644 --- a/src/addons/coursecompletion/pages/report/report.ts +++ b/src/addons/coursecompletion/pages/report/report.ts @@ -18,7 +18,6 @@ import { } from '@addons/coursecompletion/services/coursecompletion'; import { Component, OnInit } from '@angular/core'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; @@ -112,7 +111,7 @@ export class AddonCourseCompletionReportPage implements OnInit { * * @param refresher Refresher instance. */ - async refreshCompletion(refresher?: IonRefresher): Promise { + async refreshCompletion(refresher?: HTMLIonRefresherElement): Promise { await AddonCourseCompletion.invalidateCourseCompletion(this.courseId, this.userId).finally(() => { this.fetchCompletion().finally(() => { refresher?.complete(); diff --git a/src/addons/messageoutput/airnotifier/pages/devices/devices.ts b/src/addons/messageoutput/airnotifier/pages/devices/devices.ts index 6c7b1087d..829d4f798 100644 --- a/src/addons/messageoutput/airnotifier/pages/devices/devices.ts +++ b/src/addons/messageoutput/airnotifier/pages/devices/devices.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CorePushNotifications } from '@features/pushnotifications/services/pushnotifications'; @@ -123,7 +122,7 @@ export class AddonMessageOutputAirnotifierDevicesPage implements OnInit, OnDestr * * @param refresher Refresher. */ - async refreshDevices(refresher: IonRefresher): Promise { + async refreshDevices(refresher: HTMLIonRefresherElement): Promise { try { await CoreUtils.ignoreErrors(AddonMessageOutputAirnotifier.invalidateUserDevices()); diff --git a/src/addons/messages/components/conversation-info/conversation-info.component.ts b/src/addons/messages/components/conversation-info/conversation-info.component.ts index bfca2d625..8ce92e481 100644 --- a/src/addons/messages/components/conversation-info/conversation-info.component.ts +++ b/src/addons/messages/components/conversation-info/conversation-info.component.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, Input, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { AddonMessagesConversationFormatted, AddonMessagesConversationMember, @@ -116,7 +115,7 @@ export class AddonMessagesConversationInfoComponent implements OnInit { * @param refresher Refresher. * @returns Promise resolved when done. */ - async refreshData(refresher?: IonRefresher): Promise { + async refreshData(refresher?: HTMLIonRefresherElement): Promise { const promises: Promise[] = []; promises.push(AddonMessages.invalidateConversation(this.conversationId)); diff --git a/src/addons/messages/pages/contacts-35/contacts.ts b/src/addons/messages/pages/contacts-35/contacts.ts index a5dd98e8a..d69838ec0 100644 --- a/src/addons/messages/pages/contacts-35/contacts.ts +++ b/src/addons/messages/pages/contacts-35/contacts.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { AddonMessagesProvider, @@ -129,7 +128,7 @@ export class AddonMessagesContacts35Page implements OnInit, OnDestroy { * @param refresher Refresher. * @returns Promise resolved when done. */ - async refreshData(refresher?: IonRefresher): Promise { + async refreshData(refresher?: HTMLIonRefresherElement): Promise { try { if (this.searchString) { // User has searched, update the search. diff --git a/src/addons/messages/pages/contacts/contacts.ts b/src/addons/messages/pages/contacts/contacts.ts index 187a39293..94766b892 100644 --- a/src/addons/messages/pages/contacts/contacts.ts +++ b/src/addons/messages/pages/contacts/contacts.ts @@ -23,7 +23,6 @@ import { import { CoreNavigator } from '@services/navigator'; import { CoreScreen } from '@services/screen'; import { CoreDomUtils } from '@services/utils/dom'; -import { IonRefresher } from '@ionic/angular'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; /** @@ -216,7 +215,7 @@ export class AddonMessagesContactsPage implements OnInit, OnDestroy { * @param refresher Refresher. * @returns Promise resolved when done. */ - async refreshData(refresher?: IonRefresher): Promise { + async refreshData(refresher?: HTMLIonRefresherElement): Promise { try { if (this.selected == 'confirmed') { // No need to invalidate contacts, we always try to get the latest. diff --git a/src/addons/messages/pages/discussions-35/discussions.ts b/src/addons/messages/pages/discussions-35/discussions.ts index f82f985ae..5dfa7cac3 100644 --- a/src/addons/messages/pages/discussions-35/discussions.ts +++ b/src/addons/messages/pages/discussions-35/discussions.ts @@ -29,7 +29,6 @@ import { CorePushNotificationsNotificationBasicData } from '@features/pushnotifi import { CorePushNotificationsDelegate } from '@features/pushnotifications/services/push-delegate'; import { Subscription } from 'rxjs'; import { Translate } from '@singletons'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreScreen } from '@services/screen'; import { CoreMainMenuDeepLinkManager } from '@features/mainmenu/classes/deep-link-manager'; @@ -166,7 +165,7 @@ export class AddonMessagesDiscussions35Page implements OnInit, OnDestroy { * @param refreshUnreadCounts Whteher to refresh unread counts. * @returns Promise resolved when done. */ - async refreshData(refresher?: IonRefresher, refreshUnreadCounts: boolean = true): Promise { + async refreshData(refresher?: HTMLIonRefresherElement, refreshUnreadCounts: boolean = true): Promise { const promises: Promise[] = []; promises.push(AddonMessages.invalidateDiscussionsCache(this.siteId)); diff --git a/src/addons/messages/pages/group-conversations/group-conversations.ts b/src/addons/messages/pages/group-conversations/group-conversations.ts index 0250072b8..c27a34d7d 100644 --- a/src/addons/messages/pages/group-conversations/group-conversations.ts +++ b/src/addons/messages/pages/group-conversations/group-conversations.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, OnInit, OnDestroy, ViewChild, ElementRef } from '@angular/core'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; import { @@ -719,7 +719,7 @@ export class AddonMessagesGroupConversationsPage implements OnInit, OnDestroy { * @param refreshUnreadCounts Whether to refresh unread counts. * @returns Promise resolved when done. */ - async refreshData(refresher?: IonRefresher, refreshUnreadCounts: boolean = true): Promise { + async refreshData(refresher?: HTMLIonRefresherElement, refreshUnreadCounts: boolean = true): Promise { // Don't invalidate conversations and so, they always try to get latest data. try { await AddonMessages.invalidateContactRequestsCountCache(this.siteId); diff --git a/src/addons/messages/pages/settings/settings.ts b/src/addons/messages/pages/settings/settings.ts index 8b0a1ab78..91d9e6c2b 100644 --- a/src/addons/messages/pages/settings/settings.ts +++ b/src/addons/messages/pages/settings/settings.ts @@ -25,7 +25,6 @@ import { CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreConstants } from '@/core/constants'; -import { IonRefresher } from '@ionic/angular'; import { AddonNotificationsPreferencesNotificationProcessorState } from '@addons/notifications/services/notifications'; import { CorePlatform } from '@services/platform'; @@ -251,7 +250,7 @@ export class AddonMessagesSettingsPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshPreferences(refresher?: IonRefresher): void { + refreshPreferences(refresher?: HTMLIonRefresherElement): void { AddonMessages.invalidateMessagePreferences().finally(() => { this.fetchPreferences().finally(() => { refresher?.complete(); diff --git a/src/addons/mod/assign/pages/submission-list/submission-list.ts b/src/addons/mod/assign/pages/submission-list/submission-list.ts index d0a59e2e0..a92830987 100644 --- a/src/addons/mod/assign/pages/submission-list/submission-list.ts +++ b/src/addons/mod/assign/pages/submission-list/submission-list.ts @@ -16,7 +16,6 @@ import { Component, OnDestroy, AfterViewInit, ViewChild } from '@angular/core'; import { CoreListItemsManager } from '@classes/items-management/list-items-manager'; import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; -import { IonRefresher } from '@ionic/angular'; import { CoreGroupInfo } from '@services/groups'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; @@ -208,7 +207,7 @@ export class AddonModAssignSubmissionListPage implements AfterViewInit, OnDestro * * @param refresher Refresher. */ - refreshList(refresher?: IonRefresher): void { + refreshList(refresher?: HTMLIonRefresherElement): void { this.refreshAllData(true).finally(() => { refresher?.complete(); }); diff --git a/src/addons/mod/assign/pages/submission-review/submission-review.ts b/src/addons/mod/assign/pages/submission-review/submission-review.ts index 6749d9f1b..699ff3013 100644 --- a/src/addons/mod/assign/pages/submission-review/submission-review.ts +++ b/src/addons/mod/assign/pages/submission-review/submission-review.ts @@ -18,7 +18,6 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/ import { CoreSwipeNavigationItemsManager } from '@classes/items-management/swipe-navigation-items-manager'; import { CoreCourse } from '@features/course/services/course'; import { CanLeave } from '@guards/can-leave'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreScreen } from '@services/screen'; import { CoreDomUtils } from '@services/utils/dom'; @@ -210,7 +209,7 @@ export class AddonModAssignSubmissionReviewPage implements OnInit, OnDestroy, Ca * * @param refresher Refresher. */ - refreshSubmission(refresher?: IonRefresher): void { + refreshSubmission(refresher?: HTMLIonRefresherElement): void { this.refreshAllData().finally(() => { refresher?.complete(); }); diff --git a/src/addons/mod/book/pages/contents/contents.ts b/src/addons/mod/book/pages/contents/contents.ts index 3d22145cf..0581eae1d 100644 --- a/src/addons/mod/book/pages/contents/contents.ts +++ b/src/addons/mod/book/pages/contents/contents.ts @@ -24,7 +24,6 @@ import { CoreCourse } from '@features/course/services/course'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate'; import { CoreTag, CoreTagItem } from '@features/tag/services/tag'; -import { IonRefresher } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -232,7 +231,7 @@ export class AddonModBookContentsPage implements OnInit, OnDestroy { * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { if (this.manager) { await CoreUtils.ignoreErrors(Promise.all([ this.manager.getSource().invalidateContent(), diff --git a/src/addons/mod/chat/pages/session-messages/session-messages.ts b/src/addons/mod/chat/pages/session-messages/session-messages.ts index 8401d485d..e3143eec7 100644 --- a/src/addons/mod/chat/pages/session-messages/session-messages.ts +++ b/src/addons/mod/chat/pages/session-messages/session-messages.ts @@ -14,7 +14,6 @@ import { Component, OnInit } from '@angular/core'; import { CoreUser } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -158,7 +157,7 @@ export class AddonModChatSessionMessagesPage implements OnInit { * * @param refresher Refresher. */ - async refreshMessages(refresher: IonRefresher): Promise { + async refreshMessages(refresher: HTMLIonRefresherElement): Promise { try { await CoreUtils.ignoreErrors(AddonModChat.invalidateSessionMessages(this.chatId, this.sessionStart, this.groupId)); diff --git a/src/addons/mod/chat/pages/sessions/sessions.ts b/src/addons/mod/chat/pages/sessions/sessions.ts index ac3ce499b..10fb146b2 100644 --- a/src/addons/mod/chat/pages/sessions/sessions.ts +++ b/src/addons/mod/chat/pages/sessions/sessions.ts @@ -16,7 +16,6 @@ import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular import { CoreListItemsManager } from '@classes/items-management/list-items-manager'; import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; -import { IonRefresher } from '@ionic/angular'; import { CoreGroupInfo } from '@services/groups'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -143,7 +142,7 @@ export class AddonModChatSessionsPage implements OnInit, AfterViewInit, OnDestro * * @param refresher Refresher. */ - async refreshSessions(refresher: IonRefresher): Promise { + async refreshSessions(refresher: HTMLIonRefresherElement): Promise { try { this.sessions.getSource().setDirty(true); diff --git a/src/addons/mod/data/pages/entry/entry.ts b/src/addons/mod/data/pages/entry/entry.ts index 0fff2c131..c8bd10562 100644 --- a/src/addons/mod/data/pages/entry/entry.ts +++ b/src/addons/mod/data/pages/entry/entry.ts @@ -17,7 +17,7 @@ import { CoreCommentsCommentsComponent } from '@features/comments/components/com import { CoreComments } from '@features/comments/services/comments'; import { CoreCourse } from '@features/course/services/course'; import { CoreRatingInfo } from '@features/rating/services/rating'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreGroups, CoreGroupInfo } from '@services/groups'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; @@ -286,7 +286,7 @@ export class AddonModDataEntryPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshDatabase(refresher?: IonRefresher): void { + refreshDatabase(refresher?: HTMLIonRefresherElement): void { if (!this.entryLoaded) { return; } diff --git a/src/addons/mod/feedback/pages/attempts/attempts.ts b/src/addons/mod/feedback/pages/attempts/attempts.ts index 817fd2500..17114add8 100644 --- a/src/addons/mod/feedback/pages/attempts/attempts.ts +++ b/src/addons/mod/feedback/pages/attempts/attempts.ts @@ -18,7 +18,6 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/ import { CoreListItemsManager } from '@classes/items-management/list-items-manager'; import { CorePromisedValue } from '@classes/promised-value'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; -import { IonRefresher } from '@ionic/angular'; import { CoreGroupInfo } from '@services/groups'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -175,7 +174,7 @@ export class AddonModFeedbackAttemptsPage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - async refreshFeedback(refresher: IonRefresher): Promise { + async refreshFeedback(refresher: HTMLIonRefresherElement): Promise { const attempts = await this.promisedAttempts; try { diff --git a/src/addons/mod/feedback/pages/nonrespondents/nonrespondents.ts b/src/addons/mod/feedback/pages/nonrespondents/nonrespondents.ts index 2046106ff..66a88cd4f 100644 --- a/src/addons/mod/feedback/pages/nonrespondents/nonrespondents.ts +++ b/src/addons/mod/feedback/pages/nonrespondents/nonrespondents.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreGroupInfo, CoreGroups } from '@services/groups'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -174,7 +173,7 @@ export class AddonModFeedbackNonRespondentsPage implements OnInit { * * @param refresher Refresher. */ - async refreshFeedback(refresher: IonRefresher): Promise { + async refreshFeedback(refresher: HTMLIonRefresherElement): Promise { try { const promises: Promise[] = []; diff --git a/src/addons/mod/forum/pages/discussion/discussion.ts b/src/addons/mod/forum/pages/discussion/discussion.ts index 02c77a6c2..3d40cf2da 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.ts +++ b/src/addons/mod/forum/pages/discussion/discussion.ts @@ -23,7 +23,7 @@ import { CoreRatingOffline } from '@features/rating/services/rating-offline'; import { CoreRatingSyncProvider } from '@features/rating/services/rating-sync'; import { CoreUser } from '@features/user/services/user'; import { CanLeave } from '@guards/can-leave'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreNavigator } from '@services/navigator'; import { CoreScreen } from '@services/screen'; @@ -650,7 +650,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes * @param showErrors If show errors to the user of hide them. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher | null, done?: () => void, showErrors: boolean = false): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement | null, done?: () => void, showErrors: boolean = false): Promise { if (this.discussionLoaded) { await this.refreshPosts(true, showErrors).finally(() => { refresher?.complete(); diff --git a/src/addons/mod/forum/pages/new-discussion/new-discussion.ts b/src/addons/mod/forum/pages/new-discussion/new-discussion.ts index 4f3c43b73..c69537590 100644 --- a/src/addons/mod/forum/pages/new-discussion/new-discussion.ts +++ b/src/addons/mod/forum/pages/new-discussion/new-discussion.ts @@ -34,7 +34,6 @@ import { CoreSync } from '@services/sync'; import { AddonModForumDiscussionOptions, AddonModForumOffline } from '@addons/mod/forum/services/forum-offline'; import { CoreUtils } from '@services/utils/utils'; import { AddonModForumHelper } from '@addons/mod/forum/services/forum-helper'; -import { IonRefresher } from '@ionic/angular'; import { CoreFileUploader } from '@features/fileuploader/services/fileuploader'; import { CoreTextUtils } from '@services/utils/text'; import { CanLeave } from '@guards/can-leave'; @@ -453,7 +452,7 @@ export class AddonModForumNewDiscussionPage implements OnInit, OnDestroy, CanLea * * @param refresher Refresher. */ - refreshGroups(refresher?: IonRefresher): void { + refreshGroups(refresher?: HTMLIonRefresherElement): void { const promises = [ CoreGroups.invalidateActivityGroupMode(this.cmId), CoreGroups.invalidateActivityAllowedGroups(this.cmId), diff --git a/src/addons/mod/glossary/pages/entry/entry.ts b/src/addons/mod/glossary/pages/entry/entry.ts index bed205888..d40f875d6 100644 --- a/src/addons/mod/glossary/pages/entry/entry.ts +++ b/src/addons/mod/glossary/pages/entry/entry.ts @@ -24,7 +24,6 @@ import { CoreComments } from '@features/comments/services/comments'; import { CoreRatingInfo } from '@features/rating/services/rating'; import { CoreTag } from '@features/tag/services/tag'; import { FileEntry } from '@ionic-native/file/ngx'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreNetwork } from '@services/network'; import { CoreDomUtils, ToastDuration } from '@services/utils/dom'; @@ -228,7 +227,7 @@ export class AddonModGlossaryEntryPage implements OnInit, OnDestroy { * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { if (this.onlineEntry && this.glossary?.allowcomments && this.onlineEntry.id > 0 && this.commentsEnabled && this.comments) { // Refresh comments asynchronously (without blocking the current promise). CoreUtils.ignoreErrors(this.comments.doRefresh()); diff --git a/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.ts b/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.ts index 3142c9637..6e43c7092 100644 --- a/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.ts +++ b/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; import { CoreNavigator } from '@services/navigator'; @@ -94,7 +93,7 @@ export class AddonModH5PActivityAttemptResultsPage implements OnInit { * * @param refresher Refresher. */ - doRefresh(refresher: IonRefresher): void { + doRefresh(refresher: HTMLIonRefresherElement): void { this.refreshData().finally(() => { refresher.complete(); }); diff --git a/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.ts b/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.ts index f0c2c9faf..dba3a8e9d 100644 --- a/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.ts +++ b/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; import { CoreNavigator } from '@services/navigator'; @@ -97,7 +96,7 @@ export class AddonModH5PActivityUserAttemptsPage implements OnInit { * * @param refresher Refresher. */ - doRefresh(refresher: IonRefresher): void { + doRefresh(refresher: HTMLIonRefresherElement): void { this.refreshData().finally(() => { refresher.complete(); }); diff --git a/src/addons/mod/h5pactivity/pages/users-attempts/users-attempts.ts b/src/addons/mod/h5pactivity/pages/users-attempts/users-attempts.ts index f5eff6eb1..f9b2369cb 100644 --- a/src/addons/mod/h5pactivity/pages/users-attempts/users-attempts.ts +++ b/src/addons/mod/h5pactivity/pages/users-attempts/users-attempts.ts @@ -14,7 +14,6 @@ import { Component, OnInit } from '@angular/core'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -90,7 +89,7 @@ export class AddonModH5PActivityUsersAttemptsPage implements OnInit { * * @param refresher Refresher. */ - doRefresh(refresher: IonRefresher): void { + doRefresh(refresher: HTMLIonRefresherElement): void { this.refreshData().finally(() => { refresher.complete(); }); diff --git a/src/addons/mod/imscp/pages/view/view.ts b/src/addons/mod/imscp/pages/view/view.ts index ccc01af8e..6fb1d7d6b 100644 --- a/src/addons/mod/imscp/pages/view/view.ts +++ b/src/addons/mod/imscp/pages/view/view.ts @@ -20,7 +20,6 @@ import { CoreCourseResourceDownloadResult } from '@features/course/classes/main- import { CoreCourse } from '@features/course/services/course'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate'; -import { IonRefresher } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -214,7 +213,7 @@ export class AddonModImscpViewPage implements OnInit { * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(Promise.all([ AddonModImscp.invalidateContent(this.cmId, this.courseId), CoreCourseModulePrefetchDelegate.invalidateCourseUpdates(this.courseId), // To detect if IMSCP was updated. diff --git a/src/addons/mod/lesson/pages/user-retake/user-retake.ts b/src/addons/mod/lesson/pages/user-retake/user-retake.ts index 7ea3706a7..eeb58ea30 100644 --- a/src/addons/mod/lesson/pages/user-retake/user-retake.ts +++ b/src/addons/mod/lesson/pages/user-retake/user-retake.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreError } from '@classes/errors/error'; import { CoreUser } from '@features/user/services/user'; @@ -114,7 +113,7 @@ export class AddonModLessonUserRetakePage implements OnInit { * * @param refresher Refresher. */ - doRefresh(refresher: IonRefresher): void { + doRefresh(refresher: HTMLIonRefresherElement): void { this.refreshData().finally(() => { refresher?.complete(); }); diff --git a/src/addons/mod/quiz/pages/attempt/attempt.ts b/src/addons/mod/quiz/pages/attempt/attempt.ts index 7972ac3c5..71f6c87b5 100644 --- a/src/addons/mod/quiz/pages/attempt/attempt.ts +++ b/src/addons/mod/quiz/pages/attempt/attempt.ts @@ -15,7 +15,6 @@ import { isSafeNumber } from '@/core/utils/types'; import { Component, OnInit } from '@angular/core'; import { CoreError } from '@classes/errors/error'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -75,7 +74,7 @@ export class AddonModQuizAttemptPage implements OnInit { * * @param refresher Refresher. */ - doRefresh(refresher: IonRefresher): void { + doRefresh(refresher: HTMLIonRefresherElement): void { this.refreshData().finally(() => { refresher.complete(); }); diff --git a/src/addons/mod/quiz/pages/review/review.ts b/src/addons/mod/quiz/pages/review/review.ts index 63eeaf7d7..d24d5068b 100644 --- a/src/addons/mod/quiz/pages/review/review.ts +++ b/src/addons/mod/quiz/pages/review/review.ts @@ -15,7 +15,7 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import { CoreQuestionQuestionParsed } from '@features/question/services/question'; import { CoreQuestionHelper } from '@features/question/services/question-helper'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -222,7 +222,7 @@ export class AddonModQuizReviewPage implements OnInit { * * @param refresher Refresher */ - async refreshData(refresher: IonRefresher): Promise { + async refreshData(refresher: HTMLIonRefresherElement): Promise { const promises: Promise[] = []; promises.push(AddonModQuiz.invalidateQuizData(this.courseId)); diff --git a/src/addons/mod/workshop/pages/assessment/assessment.ts b/src/addons/mod/workshop/pages/assessment/assessment.ts index 82592509b..ecc6ddad3 100644 --- a/src/addons/mod/workshop/pages/assessment/assessment.ts +++ b/src/addons/mod/workshop/pages/assessment/assessment.ts @@ -18,7 +18,6 @@ import { CoreCourse } from '@features/course/services/course'; import { CoreGradesHelper, CoreGradesMenuItem } from '@features/grades/services/grades-helper'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; import { CanLeave } from '@guards/can-leave'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { CoreSync } from '@services/sync'; @@ -343,7 +342,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea * * @param refresher Refresher. */ - refreshAssessment(refresher: IonRefresher): void { + refreshAssessment(refresher: HTMLIonRefresherElement): void { if (this.loaded) { this.refreshAllData().finally(() => { refresher?.complete(); diff --git a/src/addons/mod/workshop/pages/submission/submission.ts b/src/addons/mod/workshop/pages/submission/submission.ts index 81db1a141..08fda91ba 100644 --- a/src/addons/mod/workshop/pages/submission/submission.ts +++ b/src/addons/mod/workshop/pages/submission/submission.ts @@ -20,7 +20,7 @@ import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { CoreGradesHelper, CoreGradesMenuItem } from '@features/grades/services/grades-helper'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; import { CanLeave } from '@guards/can-leave'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { CoreSync } from '@services/sync'; @@ -460,7 +460,7 @@ export class AddonModWorkshopSubmissionPage implements OnInit, OnDestroy, CanLea * * @param refresher Refresher. */ - refreshSubmission(refresher: IonRefresher): void { + refreshSubmission(refresher: HTMLIonRefresherElement): void { if (this.loaded) { this.refreshAllData().finally(() => { refresher?.complete(); diff --git a/src/addons/notes/pages/list/list.ts b/src/addons/notes/pages/list/list.ts index badf1372e..ef174a017 100644 --- a/src/addons/notes/pages/list/list.ts +++ b/src/addons/notes/pages/list/list.ts @@ -20,7 +20,7 @@ import { AddonNotesSync, AddonNotesSyncProvider } from '@addons/notes/services/n import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { CoreAnimations } from '@components/animations'; import { CoreUser, CoreUserProfile } from '@features/user/services/user'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; @@ -156,7 +156,7 @@ export class AddonNotesListPage implements OnInit, OnDestroy { * @param showSyncErrors Whether to display sync errors or not. * @param refresher Refresher instance. */ - refreshNotes(showSyncErrors: boolean, refresher?: IonRefresher): void { + refreshNotes(showSyncErrors: boolean, refresher?: HTMLIonRefresherElement): void { this.refreshIcon = CoreConstants.ICON_LOADING; this.syncIcon = CoreConstants.ICON_LOADING; diff --git a/src/addons/notifications/pages/list/list.ts b/src/addons/notifications/pages/list/list.ts index dc935a079..b496b4ea7 100644 --- a/src/addons/notifications/pages/list/list.ts +++ b/src/addons/notifications/pages/list/list.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { Subscription } from 'rxjs'; import { CoreDomUtils } from '@services/utils/dom'; @@ -205,7 +204,7 @@ export class AddonNotificationsListPage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - async refreshNotifications(refresher?: IonRefresher): Promise { + async refreshNotifications(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(AddonNotifications.invalidateNotificationsList()); await CoreUtils.ignoreErrors(this.fetchNotifications(true)); diff --git a/src/addons/notifications/pages/settings/settings.ts b/src/addons/notifications/pages/settings/settings.ts index 17a87fe72..7b9b891ca 100644 --- a/src/addons/notifications/pages/settings/settings.ts +++ b/src/addons/notifications/pages/settings/settings.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, OnDestroy } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreConfig } from '@services/config'; import { CoreLocalNotifications } from '@services/local-notifications'; @@ -192,7 +191,7 @@ export class AddonNotificationsSettingsPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - async refreshPreferences(refresher?: IonRefresher): Promise { + async refreshPreferences(refresher?: HTMLIonRefresherElement): Promise { try { await CoreUtils.ignoreErrors(AddonNotifications.invalidateNotificationPreferences()); diff --git a/src/addons/privatefiles/pages/index/index.ts b/src/addons/privatefiles/pages/index/index.ts index 4eca6fd5f..43d699e15 100644 --- a/src/addons/privatefiles/pages/index/index.ts +++ b/src/addons/privatefiles/pages/index/index.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { Md5 } from 'ts-md5/dist/md5'; import { CoreNetwork } from '@services/network'; @@ -140,7 +139,7 @@ export class AddonPrivateFilesIndexPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { this.refreshFiles().finally(() => { refresher?.complete(); }); diff --git a/src/core/features/block/components/side-blocks/side-blocks.ts b/src/core/features/block/components/side-blocks/side-blocks.ts index e3c75876c..5a317c800 100644 --- a/src/core/features/block/components/side-blocks/side-blocks.ts +++ b/src/core/features/block/components/side-blocks/side-blocks.ts @@ -19,7 +19,6 @@ import { CoreCourse, CoreCourseBlock } from '@features/course/services/course'; import { CoreBlockHelper } from '../../services/block-helper'; import { CoreBlockComponent } from '../block/block'; import { CoreUtils } from '@services/utils/utils'; -import { IonRefresher } from '@ionic/angular'; import { CoreCoursesDashboard } from '@features/courses/services/dashboard'; import { CoreTextUtils } from '@services/utils/text'; import { CoreDom } from '@singletons/dom'; @@ -110,7 +109,7 @@ export class CoreBlockSideBlocksComponent implements OnInit { * * @param refresher Refresher. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(this.invalidateBlocks()); await this.loadContent().finally(() => { diff --git a/src/core/features/comments/pages/viewer/viewer.ts b/src/core/features/comments/pages/viewer/viewer.ts index f1401ecb6..b5f4d3c4e 100644 --- a/src/core/features/comments/pages/viewer/viewer.ts +++ b/src/core/features/comments/pages/viewer/viewer.ts @@ -26,7 +26,7 @@ import { CoreCommentsSync, CoreCommentsSyncProvider, } from '@features/comments/services/comments-sync'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { ContextLevel, CoreConstants } from '@/core/constants'; import { CoreNavigator } from '@services/navigator'; import { NgZone, Translate } from '@singletons'; @@ -249,7 +249,7 @@ export class CoreCommentsViewerPage implements OnInit, OnDestroy { * @param refresher Refresher. * @returns Resolved when done. */ - async refreshComments(showErrors: boolean, refresher?: IonRefresher): Promise { + async refreshComments(showErrors: boolean, refresher?: HTMLIonRefresherElement): Promise { this.commentsLoaded = false; this.refreshIcon = CoreConstants.ICON_LOADING; this.syncIcon = CoreConstants.ICON_LOADING; diff --git a/src/core/features/course/classes/main-resource-component.ts b/src/core/features/course/classes/main-resource-component.ts index 80b58ad71..8acc3e872 100644 --- a/src/core/features/course/classes/main-resource-component.ts +++ b/src/core/features/course/classes/main-resource-component.ts @@ -15,7 +15,6 @@ import { CoreConstants } from '@/core/constants'; import { OnInit, OnDestroy, Input, Output, EventEmitter, Component, Optional, Inject } from '@angular/core'; import { CoreAnyError } from '@classes/errors/error'; -import { IonRefresher } from '@ionic/angular'; import { CoreNetwork } from '@services/network'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -121,7 +120,7 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, * @param showErrors If show errors to the user of hide them. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher | null, showErrors = false): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement | null, showErrors = false): Promise { if (!this.module) { // Module can be undefined if course format changes from single activity to weekly/topics. return; diff --git a/src/core/features/course/components/course-format/course-format.ts b/src/core/features/course/components/course-format/course-format.ts index 341f3d215..784a0d09a 100644 --- a/src/core/features/course/components/course-format/course-format.ts +++ b/src/core/features/course/components/course-format/course-format.ts @@ -39,7 +39,7 @@ import { } from '@features/course/services/course-helper'; import { CoreCourseFormatDelegate } from '@features/course/services/format-delegate'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreUtils } from '@services/utils/utils'; import { CoreCourseCourseIndexComponent, CoreCourseIndexSectionWithModule } from '../course-index/course-index'; import { CoreBlockHelper } from '@features/block/services/block-helper'; @@ -567,7 +567,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { * @param afterCompletionChange Whether the refresh is due to a completion change. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void, afterCompletionChange?: boolean): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void, afterCompletionChange?: boolean): Promise { const promises = this.dynamicComponents?.map(async (component) => { await component.callComponentMethod('doRefresh', refresher, done, afterCompletionChange); }) || []; diff --git a/src/core/features/course/format/singleactivity/components/singleactivity.ts b/src/core/features/course/format/singleactivity/components/singleactivity.ts index fc31f9ffe..0cfe37c73 100644 --- a/src/core/features/course/format/singleactivity/components/singleactivity.ts +++ b/src/core/features/course/format/singleactivity/components/singleactivity.ts @@ -18,7 +18,6 @@ import { CoreCourseModuleDelegate } from '@features/course/services/module-deleg import { CoreCourseUnsupportedModuleComponent } from '@features/course/components/unsupported-module/unsupported-module'; import { CoreDynamicComponent } from '@components/dynamic-component/dynamic-component'; import { CoreCourseAnyCourseData } from '@features/courses/services/courses'; -import { IonRefresher } from '@ionic/angular'; import { CoreCourseModuleCompletionData, CoreCourseSection } from '@features/course/services/course-helper'; import { CoreCourse } from '@features/course/services/course'; import type { CoreCourseModuleMainActivityComponent } from '@features/course/classes/main-activity-component'; @@ -80,7 +79,7 @@ export class CoreCourseFormatSingleActivityComponent implements OnChanges { * @param afterCompletionChange Whether the refresh is due to a completion change. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void, afterCompletionChange?: boolean): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void, afterCompletionChange?: boolean): Promise { if (afterCompletionChange) { // Don't refresh the view after a completion change since completion isn't displayed. return; diff --git a/src/core/features/course/pages/contents/contents.ts b/src/core/features/course/pages/contents/contents.ts index 88345545b..ba640a94f 100644 --- a/src/core/features/course/pages/contents/contents.ts +++ b/src/core/features/course/pages/contents/contents.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, ViewChild, OnInit, OnDestroy, forwardRef, ChangeDetectorRef } from '@angular/core'; -import { IonContent, IonRefresher } from '@ionic/angular'; +import { IonContent } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -291,7 +291,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(this.invalidateData()); try { diff --git a/src/core/features/course/pages/course-summary/course-summary.page.ts b/src/core/features/course/pages/course-summary/course-summary.page.ts index 4e6c5547b..73512e822 100644 --- a/src/core/features/course/pages/course-summary/course-summary.page.ts +++ b/src/core/features/course/pages/course-summary/course-summary.page.ts @@ -13,7 +13,7 @@ // limitations under the License. import { Component, OnDestroy, OnInit, Input, ViewChild, ElementRef } from '@angular/core'; -import { ActionSheetButton, IonRefresher } from '@ionic/angular'; +import { ActionSheetButton } from '@ionic/angular'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -402,7 +402,7 @@ export class CoreCourseSummaryPage implements OnInit, OnDestroy { * * @param refresher The refresher if this was triggered by a Pull To Refresh. */ - async refreshData(refresher?: IonRefresher): Promise { + async refreshData(refresher?: HTMLIonRefresherElement): Promise { const promises: Promise[] = []; promises.push(CoreCourses.invalidateUserCourses()); diff --git a/src/core/features/course/pages/list-mod-type/list-mod-type.ts b/src/core/features/course/pages/list-mod-type/list-mod-type.ts index d10977796..d93fa4788 100644 --- a/src/core/features/course/pages/list-mod-type/list-mod-type.ts +++ b/src/core/features/course/pages/list-mod-type/list-mod-type.ts @@ -20,7 +20,6 @@ import { CoreCourseModuleDelegate } from '@features/course/services/module-deleg import { CoreCourseHelper, CoreCourseSection } from '@features/course/services/course-helper'; import { CoreNavigator } from '@services/navigator'; import { CoreConstants } from '@/core/constants'; -import { IonRefresher } from '@ionic/angular'; import { CoreUtils } from '@services/utils/utils'; import { CoreTime } from '@singletons/time'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; @@ -167,7 +166,7 @@ export class CoreCourseListModTypePage implements OnInit { * * @param refresher Refresher. */ - async refreshData(refresher: IonRefresher): Promise { + async refreshData(refresher: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreCourse.invalidateSections(this.courseId)); try { diff --git a/src/core/features/course/pages/module-preview/module-preview.ts b/src/core/features/course/pages/module-preview/module-preview.ts index fc154b4bd..c5192b9d6 100644 --- a/src/core/features/course/pages/module-preview/module-preview.ts +++ b/src/core/features/course/pages/module-preview/module-preview.ts @@ -20,7 +20,6 @@ import { import { CoreCourse } from '@features/course/services/course'; import { CoreCourseHelper, CoreCourseModuleData, CoreCourseSection } from '@features/course/services/course-helper'; import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -140,7 +139,7 @@ export class CoreCourseModulePreviewPage implements OnInit { * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement): Promise { await CoreCourse.invalidateModule(this.module.id); diff --git a/src/core/features/course/services/module-delegate.ts b/src/core/features/course/services/module-delegate.ts index dbd4b224d..694743908 100644 --- a/src/core/features/course/services/module-delegate.ts +++ b/src/core/features/course/services/module-delegate.ts @@ -14,7 +14,6 @@ import { Injectable, Type } from '@angular/core'; import { SafeUrl } from '@angular/platform-browser'; -import { IonRefresher } from '@ionic/angular'; import { CoreSite } from '@classes/site'; import { CoreCourseModuleDefaultHandler } from './handlers/default-module'; @@ -234,7 +233,7 @@ export interface CoreCourseModuleMainComponent { * @param showErrors If show errors to the user of hide them. * @returns Promise resolved when done. */ - doRefresh(refresher?: IonRefresher | null, showErrors?: boolean): Promise; + doRefresh(refresher?: HTMLIonRefresherElement | null, showErrors?: boolean): Promise; } /** diff --git a/src/core/features/courses/pages/categories/categories.ts b/src/core/features/courses/pages/categories/categories.ts index f081616d8..f770425d2 100644 --- a/src/core/features/courses/pages/categories/categories.ts +++ b/src/core/features/courses/pages/categories/categories.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -163,7 +162,7 @@ export class CoreCoursesCategoriesPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshCategories(refresher?: IonRefresher): void { + refreshCategories(refresher?: HTMLIonRefresherElement): void { const promises: Promise[] = []; promises.push(CoreCourses.invalidateUserCourses()); diff --git a/src/core/features/courses/pages/dashboard/dashboard.ts b/src/core/features/courses/pages/dashboard/dashboard.ts index a459879ee..5db3bed54 100644 --- a/src/core/features/courses/pages/dashboard/dashboard.ts +++ b/src/core/features/courses/pages/dashboard/dashboard.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreCourses } from '../../services/courses'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; @@ -146,7 +145,7 @@ export class CoreCoursesDashboardPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshDashboard(refresher: IonRefresher): void { + refreshDashboard(refresher: HTMLIonRefresherElement): void { const promises: Promise[] = []; promises.push(CoreCoursesDashboard.invalidateDashboardBlocks()); diff --git a/src/core/features/courses/pages/list/list.ts b/src/core/features/courses/pages/list/list.ts index f61ba3d0a..0a3d460ec 100644 --- a/src/core/features/courses/pages/list/list.ts +++ b/src/core/features/courses/pages/list/list.ts @@ -14,7 +14,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { CoreCoursesHelper, CoreEnrolledCourseDataWithExtraInfo } from '@features/courses/services/courses-helper'; -import { IonRefresher } from '@ionic/angular'; import { CoreNavigator } from '@services/navigator'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -215,7 +214,7 @@ export class CoreCoursesListPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshCourses(refresher: IonRefresher): void { + refreshCourses(refresher: HTMLIonRefresherElement): void { const promises: Promise[] = []; if (!this.searchMode) { diff --git a/src/core/features/courses/pages/my/my.ts b/src/core/features/courses/pages/my/my.ts index 23612dac6..ddac3c1ed 100644 --- a/src/core/features/courses/pages/my/my.ts +++ b/src/core/features/courses/pages/my/my.ts @@ -22,7 +22,6 @@ import { CoreBlockDelegate } from '@features/block/services/block-delegate'; import { CoreCourseBlock } from '@features/course/services/course'; import { CoreCoursesDashboard, CoreCoursesDashboardProvider } from '@features/courses/services/dashboard'; import { CoreMainMenuDeepLinkManager } from '@features/mainmenu/classes/deep-link-manager'; -import { IonRefresher } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; @@ -181,7 +180,7 @@ export class CoreCoursesMyPage implements OnInit, OnDestroy, AsyncDirective { * * @param refresher Refresher. */ - async refresh(refresher?: IonRefresher): Promise { + async refresh(refresher?: HTMLIonRefresherElement): Promise { const promises: Promise[] = []; diff --git a/src/core/features/grades/pages/course/course.page.ts b/src/core/features/grades/pages/course/course.page.ts index d4383aa78..40d8d4ee4 100644 --- a/src/core/features/grades/pages/course/course.page.ts +++ b/src/core/features/grades/pages/course/course.page.ts @@ -14,7 +14,6 @@ import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'; import { AfterViewInit, Component, ElementRef, OnDestroy } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreGrades } from '@features/grades/services/grades'; @@ -185,7 +184,7 @@ export class CoreGradesCoursePage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - async refreshGrades(refresher: IonRefresher): Promise { + async refreshGrades(refresher: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreGrades.invalidateCourseGradesData(this.courseId, this.userId)); await CoreUtils.ignoreErrors(this.fetchGrades()); diff --git a/src/core/features/grades/pages/courses/courses.ts b/src/core/features/grades/pages/courses/courses.ts index 79e55d35a..91f309cbb 100644 --- a/src/core/features/grades/pages/courses/courses.ts +++ b/src/core/features/grades/pages/courses/courses.ts @@ -19,7 +19,6 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/ import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { CoreGradesCoursesSource } from '@features/grades/classes/grades-courses-source'; import { CoreGrades } from '@features/grades/services/grades'; -import { IonRefresher } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -66,7 +65,7 @@ export class CoreGradesCoursesPage implements OnDestroy, AfterViewInit { * * @param refresher Refresher. */ - async refreshCourses(refresher: IonRefresher): Promise { + async refreshCourses(refresher: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreGrades.invalidateCoursesGradesData()); await CoreUtils.ignoreErrors(this.courses.reload()); diff --git a/src/core/features/reportbuilder/components/report-detail/report-detail.ts b/src/core/features/reportbuilder/components/report-detail/report-detail.ts index 0e48d1701..5be288272 100644 --- a/src/core/features/reportbuilder/components/report-detail/report-detail.ts +++ b/src/core/features/reportbuilder/components/report-detail/report-detail.ts @@ -20,7 +20,6 @@ import { CoreReportBuilderRetrieveReportMapped, REPORT_ROWS_LIMIT, } from '@features/reportbuilder/services/reportbuilder'; -import { IonRefresher } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreNavigator } from '@services/navigator'; import { CoreScreen } from '@services/screen'; @@ -170,7 +169,7 @@ export class CoreReportBuilderReportDetailComponent implements OnInit { * * @param ionRefresher ionic refresher. */ - async refreshReport(ionRefresher?: IonRefresher): Promise { + async refreshReport(ionRefresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreReportBuilder.invalidateReport()); this.updateState({ page: 0, canLoadMoreRows: false }); await CoreUtils.ignoreErrors(this.getReport()); diff --git a/src/core/features/reportbuilder/pages/list/list.ts b/src/core/features/reportbuilder/pages/list/list.ts index d67c23af3..6d951d1a9 100644 --- a/src/core/features/reportbuilder/pages/list/list.ts +++ b/src/core/features/reportbuilder/pages/list/list.ts @@ -17,7 +17,6 @@ import { CoreListItemsManager } from '@classes/items-management/list-items-manag import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/routed-items-manager-sources-tracker'; import { CoreReportBuilderReportsSource } from '@features/reportbuilder/classes/reports-source'; import { CoreReportBuilder, CoreReportBuilderReport, REPORTS_LIST_LIMIT } from '@features/reportbuilder/services/reportbuilder'; -import { IonRefresher } from '@ionic/angular'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; import { CoreNavigator } from '@services/navigator'; import { CoreDomUtils } from '@services/utils/dom'; @@ -114,7 +113,7 @@ export class CoreReportBuilderListPage implements AfterViewInit, OnDestroy { * * @param ionRefresher ionRefresher. */ - async refreshReports(ionRefresher?: IonRefresher): Promise { + async refreshReports(ionRefresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreReportBuilder.invalidateReportsList()); await CoreUtils.ignoreErrors(this.fetchReports(true)); await ionRefresher?.complete(); diff --git a/src/core/features/search/components/global-search-filters/global-search-filters.component.ts b/src/core/features/search/components/global-search-filters/global-search-filters.component.ts index ca7d6c3b9..75eae485b 100644 --- a/src/core/features/search/components/global-search-filters/global-search-filters.component.ts +++ b/src/core/features/search/components/global-search-filters/global-search-filters.component.ts @@ -22,7 +22,6 @@ import { } from '@features/search/services/global-search'; import { CoreEvents } from '@singletons/events'; import { ModalController } from '@singletons'; -import { IonRefresher } from '@ionic/angular'; import { CoreUtils } from '@services/utils/utils'; type Filter = T & { checked: boolean }; @@ -145,7 +144,7 @@ export class CoreSearchGlobalSearchFiltersComponent implements OnInit { * * @param refresher Refresher. */ - async refreshFilters(refresher?: IonRefresher): Promise { + async refreshFilters(refresher?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(Promise.all([ CoreSearchGlobalSearch.invalidateSearchAreas(), CoreCourses.invalidateUserCourses(), diff --git a/src/core/features/settings/pages/site/site.ts b/src/core/features/settings/pages/site/site.ts index bfe1dd30a..847054437 100644 --- a/src/core/features/settings/pages/site/site.ts +++ b/src/core/features/settings/pages/site/site.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSettingsHandlerToDisplay, CoreSettingsPageHandlerToDisplay } from '../../services/settings-delegate'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; @@ -140,7 +139,7 @@ export class CoreSitePreferencesPage implements AfterViewInit, OnDestroy { * * @param refresher Refresher. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { this.handlers.getSource().setDirty(true); this.fetchData().finally(() => { refresher?.complete(); diff --git a/src/core/features/settings/pages/space-usage/space-usage.ts b/src/core/features/settings/pages/space-usage/space-usage.ts index 7a3265a2c..48afef177 100644 --- a/src/core/features/settings/pages/space-usage/space-usage.ts +++ b/src/core/features/settings/pages/space-usage/space-usage.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSiteBasicInfo, CoreSites } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; @@ -155,7 +154,7 @@ export class CoreSettingsSpaceUsagePage implements OnInit, OnDestroy { * * @param refresher Refresher event. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { this.loadSiteData().finally(() => { refresher?.complete(); }); diff --git a/src/core/features/sharedfiles/components/list/list.ts b/src/core/features/sharedfiles/components/list/list.ts index 694301ea7..b2d802af2 100644 --- a/src/core/features/sharedfiles/components/list/list.ts +++ b/src/core/features/sharedfiles/components/list/list.ts @@ -14,7 +14,6 @@ import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core'; import { FileEntry, DirectoryEntry } from '@ionic-native/file/ngx'; -import { IonRefresher } from '@ionic/angular'; import { Md5 } from 'ts-md5'; import { CoreSharedFiles } from '@features/sharedfiles/services/sharedfiles'; @@ -82,7 +81,7 @@ export class CoreSharedFilesListComponent implements OnInit, OnDestroy { * * @param refresher Refresher. */ - refreshFiles(refresher: IonRefresher): void { + refreshFiles(refresher: HTMLIonRefresherElement): void { this.loadFiles().finally(() => { refresher.complete(); }); diff --git a/src/core/features/sitehome/pages/index/index.ts b/src/core/features/sitehome/pages/index/index.ts index 3d2d72c7b..3bfda7dc0 100644 --- a/src/core/features/sitehome/pages/index/index.ts +++ b/src/core/features/sitehome/pages/index/index.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { ActivatedRoute } from '@angular/router'; import { CoreSite, CoreSiteConfig } from '@classes/site'; @@ -163,7 +162,7 @@ export class CoreSiteHomeIndexPage implements OnInit, OnDestroy { * * @param refresher Refresher. */ - doRefresh(refresher?: IonRefresher): void { + doRefresh(refresher?: HTMLIonRefresherElement): void { const promises: Promise[] = []; promises.push(CoreCourse.invalidateSections(this.siteHomeId)); diff --git a/src/core/features/siteplugins/components/course-format/course-format.ts b/src/core/features/siteplugins/components/course-format/course-format.ts index efe971370..26e2de463 100644 --- a/src/core/features/siteplugins/components/course-format/course-format.ts +++ b/src/core/features/siteplugins/components/course-format/course-format.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnChanges, Input, ViewChild, HostBinding } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreCourseFormatComponent } from '@features/course/components/course-format/course-format'; import { CoreCourseSection } from '@features/course/services/course-helper'; @@ -93,7 +92,7 @@ export class CoreSitePluginsCourseFormatComponent implements OnChanges { * @param afterCompletionChange Whether the refresh is due to a completion change. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher, done?: () => void, afterCompletionChange?: boolean): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement, done?: () => void, afterCompletionChange?: boolean): Promise { await this.content?.refreshContent(afterCompletionChange); } 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 5fded906b..71f1934f4 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -30,7 +30,6 @@ import { CoreSitePluginsContent, CoreSitePluginsCourseModuleHandlerData, } from '@features/siteplugins/services/siteplugins'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreUtils } from '@services/utils/utils'; import { CoreSitePluginsPluginContentComponent, CoreSitePluginsPluginContentLoadedData } from '../plugin-content/plugin-content'; @@ -122,7 +121,7 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C * @param refresher Refresher. * @returns Promise resolved when done. */ - async doRefresh(refresher?: IonRefresher | null): Promise { + async doRefresh(refresher?: HTMLIonRefresherElement | null): Promise { try { await this.content?.refreshContent(false); } finally { diff --git a/src/core/features/siteplugins/pages/course-option/course-option.ts b/src/core/features/siteplugins/pages/course-option/course-option.ts index 564b3ea57..890bcbe23 100644 --- a/src/core/features/siteplugins/pages/course-option/course-option.ts +++ b/src/core/features/siteplugins/pages/course-option/course-option.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSitePluginsPluginContentComponent } from '@features/siteplugins/components/plugin-content/plugin-content'; import { CoreSitePlugins, CoreSitePluginsContent } from '@features/siteplugins/services/siteplugins'; @@ -70,7 +69,7 @@ export class CoreSitePluginsCourseOptionPage implements OnInit { * * @param refresher Refresher. */ - async refreshData(refresher: IonRefresher): Promise { + async refreshData(refresher: HTMLIonRefresherElement): Promise { try { await this.content?.refreshContent(false); } finally { diff --git a/src/core/features/siteplugins/pages/module-index/module-index.ts b/src/core/features/siteplugins/pages/module-index/module-index.ts index 053eb374f..3a37e712d 100644 --- a/src/core/features/siteplugins/pages/module-index/module-index.ts +++ b/src/core/features/siteplugins/pages/module-index/module-index.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreCourseModuleData } from '@features/course/services/course-helper'; import { CanLeave } from '@guards/can-leave'; @@ -73,7 +72,7 @@ export class CoreSitePluginsModuleIndexPage implements OnInit, CanLeave { * * @param refresher Refresher. */ - refreshData(refresher: IonRefresher): void { + refreshData(refresher: HTMLIonRefresherElement): void { this.content?.doRefresh().finally(() => { refresher.complete(); }); diff --git a/src/core/features/siteplugins/pages/plugin/plugin.ts b/src/core/features/siteplugins/pages/plugin/plugin.ts index 644325866..6ad96e620 100644 --- a/src/core/features/siteplugins/pages/plugin/plugin.ts +++ b/src/core/features/siteplugins/pages/plugin/plugin.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSiteWSPreSets } from '@classes/site'; import { CoreSitePluginsContent } from '@features/siteplugins/services/siteplugins'; @@ -61,7 +60,7 @@ export class CoreSitePluginsPluginPage implements OnInit, CanLeave { * * @param refresher Refresher. */ - refreshData(refresher: IonRefresher): void { + refreshData(refresher: HTMLIonRefresherElement): void { this.content?.refreshContent(false).finally(() => { refresher.complete(); }); diff --git a/src/core/features/tag/pages/index-area/index-area.ts b/src/core/features/tag/pages/index-area/index-area.ts index 0c8577e05..567baa48b 100644 --- a/src/core/features/tag/pages/index-area/index-area.ts +++ b/src/core/features/tag/pages/index-area/index-area.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit, Type } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreTag } from '@features/tag/services/tag'; import { ActivatedRoute } from '@angular/router'; @@ -153,7 +152,7 @@ export class CoreTagIndexAreaPage implements OnInit { * * @param refresher Refresher. */ - async refreshData(refresher?: IonRefresher): Promise { + async refreshData(refresher?: HTMLIonRefresherElement): Promise { try { await CoreTag.invalidateTagIndexPerArea( this.tagId, diff --git a/src/core/features/tag/pages/index/index.ts b/src/core/features/tag/pages/index/index.ts index 84dcd5bb9..fba315863 100644 --- a/src/core/features/tag/pages/index/index.ts +++ b/src/core/features/tag/pages/index/index.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreTag } from '@features/tag/services/tag'; import { CoreTagAreaDelegate } from '@features/tag/services/tag-area-delegate'; @@ -149,7 +148,7 @@ export class CoreTagIndexPage implements OnInit { * * @param refresher Refresher. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { CoreTag.invalidateTagIndexPerArea( this.tagId, this.tagName, diff --git a/src/core/features/tag/pages/search/search.ts b/src/core/features/tag/pages/search/search.ts index a608bd197..f6ce23666 100644 --- a/src/core/features/tag/pages/search/search.ts +++ b/src/core/features/tag/pages/search/search.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreApp } from '@services/app'; import { CoreDomUtils } from '@services/utils/dom'; @@ -130,7 +129,7 @@ export class CoreTagSearchPage implements OnInit { * * @param refresher Refresher event. */ - refreshData(refresher?: IonRefresher): void { + refreshData(refresher?: HTMLIonRefresherElement): void { CoreUtils.allPromises([ CoreTag.invalidateTagCollections(), CoreTag.invalidateTagCloud(this.collectionId, undefined, undefined, this.query), diff --git a/src/core/features/user/pages/about/about.ts b/src/core/features/user/pages/about/about.ts index a43734ce4..e6e38c9ee 100644 --- a/src/core/features/user/pages/about/about.ts +++ b/src/core/features/user/pages/about/about.ts @@ -13,7 +13,6 @@ // limitations under the License. import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; @@ -202,7 +201,7 @@ export class CoreUserAboutPage implements OnInit, OnDestroy { * @param event Event. * @returns Promise resolved when done. */ - async refreshUser(event?: IonRefresher): Promise { + async refreshUser(event?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreUser.invalidateUserCache(this.userId)); await this.fetchUser(); diff --git a/src/core/features/user/pages/participants/participants.page.ts b/src/core/features/user/pages/participants/participants.page.ts index 78c4d81ca..12aff7f44 100644 --- a/src/core/features/user/pages/participants/participants.page.ts +++ b/src/core/features/user/pages/participants/participants.page.ts @@ -13,7 +13,6 @@ // limitations under the License. import { AfterViewInit, Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { CoreApp } from '@services/app'; import { CoreDomUtils } from '@services/utils/dom'; @@ -136,7 +135,7 @@ export class CoreUserParticipantsPage implements OnInit, AfterViewInit, OnDestro * * @param refresher Refresher. */ - async refreshParticipants(refresher: IonRefresher): Promise { + async refreshParticipants(refresher: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(CoreUser.invalidateParticipantsList(this.courseId)); await CoreUtils.ignoreErrors(this.fetchParticipants(true)); diff --git a/src/core/features/user/pages/profile/profile.ts b/src/core/features/user/pages/profile/profile.ts index dd299b24f..cbbb6e5c5 100644 --- a/src/core/features/user/pages/profile/profile.ts +++ b/src/core/features/user/pages/profile/profile.ts @@ -14,7 +14,6 @@ import { ActivatedRoute, ActivatedRouteSnapshot } from '@angular/router'; import { Component, OnDestroy, OnInit } from '@angular/core'; -import { IonRefresher } from '@ionic/angular'; import { Subscription } from 'rxjs'; import { CoreSite } from '@classes/site'; @@ -188,7 +187,7 @@ export class CoreUserProfilePage implements OnInit, OnDestroy { * @param event Event. * @returns Promise resolved when done. */ - async refreshUser(event?: IonRefresher): Promise { + async refreshUser(event?: HTMLIonRefresherElement): Promise { await CoreUtils.ignoreErrors(Promise.all([ CoreUser.invalidateUserCache(this.userId), CoreCourses.invalidateUserNavigationOptions(),