MOBILE-3833 core: Add missing managers destroy
parent
2c8850b669
commit
e79172518e
|
@ -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 { Component, OnInit } from '@angular/core';
|
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||||
import { IonRefresher } from '@ionic/angular';
|
import { IonRefresher } from '@ionic/angular';
|
||||||
import { CoreTimeUtils } from '@services/utils/time';
|
import { CoreTimeUtils } from '@services/utils/time';
|
||||||
import { CoreDomUtils } from '@services/utils/dom';
|
import { CoreDomUtils } from '@services/utils/dom';
|
||||||
|
@ -34,7 +34,7 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/
|
||||||
selector: 'page-addon-badges-issued-badge',
|
selector: 'page-addon-badges-issued-badge',
|
||||||
templateUrl: 'issued-badge.html',
|
templateUrl: 'issued-badge.html',
|
||||||
})
|
})
|
||||||
export class AddonBadgesIssuedBadgePage implements OnInit {
|
export class AddonBadgesIssuedBadgePage implements OnInit, OnDestroy {
|
||||||
|
|
||||||
protected badgeHash = '';
|
protected badgeHash = '';
|
||||||
protected userId!: number;
|
protected userId!: number;
|
||||||
|
@ -71,6 +71,13 @@ export class AddonBadgesIssuedBadgePage implements OnInit {
|
||||||
this.badges.start();
|
this.badges.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this.badges.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the issued badge required for the view.
|
* Fetch the issued badge required for the view.
|
||||||
*
|
*
|
||||||
|
|
|
@ -640,6 +640,7 @@ export class AddonModForumNewDiscussionPage implements OnInit, OnDestroy, CanLea
|
||||||
CoreSync.unblockOperation(AddonModForumProvider.COMPONENT, this.syncId);
|
CoreSync.unblockOperation(AddonModForumProvider.COMPONENT, this.syncId);
|
||||||
}
|
}
|
||||||
this.isDestroyed = true;
|
this.isDestroyed = true;
|
||||||
|
this.discussions?.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ export class CoreSitePreferencesPage implements AfterViewInit, OnDestroy {
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.isDestroyed = true;
|
this.isDestroyed = true;
|
||||||
this.sitesObserver?.off();
|
this.sitesObserver?.off();
|
||||||
|
this.handlers.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue