From f6f876cf3fb2f9c9760dab33f736d265619d6be6 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 20 Apr 2022 13:52:29 +0200 Subject: [PATCH] MOBILE-3833 core: Clean up swipe managers --- src/addons/calendar/components/calendar/calendar.ts | 1 + src/addons/calendar/pages/day/day.page.ts | 1 + src/addons/mod/book/pages/contents/contents.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/addons/calendar/components/calendar/calendar.ts b/src/addons/calendar/components/calendar/calendar.ts index 35b8f92d1..f60aff1ce 100644 --- a/src/addons/calendar/components/calendar/calendar.ts +++ b/src/addons/calendar/components/calendar/calendar.ts @@ -324,6 +324,7 @@ export class AddonCalendarCalendarComponent implements OnInit, DoCheck, OnDestro */ ngOnDestroy(): void { this.undeleteEventObserver?.off(); + this.manager?.destroy(); this.managerUnsubscribe && this.managerUnsubscribe(); } diff --git a/src/addons/calendar/pages/day/day.page.ts b/src/addons/calendar/pages/day/day.page.ts index 5c7e7c4b9..36746c630 100644 --- a/src/addons/calendar/pages/day/day.page.ts +++ b/src/addons/calendar/pages/day/day.page.ts @@ -452,6 +452,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy { this.manualSyncObserver?.off(); this.onlineObserver?.unsubscribe(); this.filterChangedObserver?.off(); + this.manager?.destroy(); this.managerUnsubscribe && this.managerUnsubscribe(); } diff --git a/src/addons/mod/book/pages/contents/contents.ts b/src/addons/mod/book/pages/contents/contents.ts index 865279a06..2a030fb9f 100644 --- a/src/addons/mod/book/pages/contents/contents.ts +++ b/src/addons/mod/book/pages/contents/contents.ts @@ -315,6 +315,7 @@ export class AddonModBookContentsPage implements OnInit, OnDestroy { */ ngOnDestroy(): void { this.managerUnsubscribe && this.managerUnsubscribe(); + this.manager?.destroy(); } }