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
|
||||
// limitations under the License.
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { IonRefresher } from '@ionic/angular';
|
||||
import { CoreTimeUtils } from '@services/utils/time';
|
||||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
|
@ -34,7 +34,7 @@ import { CoreRoutedItemsManagerSourcesTracker } from '@classes/items-management/
|
|||
selector: 'page-addon-badges-issued-badge',
|
||||
templateUrl: 'issued-badge.html',
|
||||
})
|
||||
export class AddonBadgesIssuedBadgePage implements OnInit {
|
||||
export class AddonBadgesIssuedBadgePage implements OnInit, OnDestroy {
|
||||
|
||||
protected badgeHash = '';
|
||||
protected userId!: number;
|
||||
|
@ -71,6 +71,13 @@ export class AddonBadgesIssuedBadgePage implements OnInit {
|
|||
this.badges.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
ngOnDestroy(): void {
|
||||
this.badges.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
this.isDestroyed = true;
|
||||
this.discussions?.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ export class CoreSitePreferencesPage implements AfterViewInit, OnDestroy {
|
|||
ngOnDestroy(): void {
|
||||
this.isDestroyed = true;
|
||||
this.sitesObserver?.off();
|
||||
this.handlers.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue