forked from EVOgeek/Vmeda.Online
		
	Merge pull request #3251 from NoelDeMartin/MOBILE-3833
MOBILE-3833 core: Add missing managers destroy
This commit is contained in:
		
						commit
						38c12d9a33
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user