diff --git a/src/phases/egg-summary-phase.ts b/src/phases/egg-summary-phase.ts index 1aa432829a1..75c6939daf1 100644 --- a/src/phases/egg-summary-phase.ts +++ b/src/phases/egg-summary-phase.ts @@ -43,9 +43,9 @@ export class EggSummaryPhase extends Phase { } end() { - this.eggHatchHandler.clear(); - this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => {}); this.scene.time.delayedCall(250, () => this.scene.setModifiersVisible(true)); - super.end(); + this.scene.ui.setModeForceTransition(Mode.MESSAGE).then(() => { + super.end(); + }); } } diff --git a/src/ui/egg-summary-ui-handler.ts b/src/ui/egg-summary-ui-handler.ts index af82ab33438..52516196093 100644 --- a/src/ui/egg-summary-ui-handler.ts +++ b/src/ui/egg-summary-ui-handler.ts @@ -97,6 +97,7 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.pokemonIconsContainer.removeAll(true); this.eggHatchBg.setVisible(false); this.getUi().hideTooltip(); + // Note: Questions on garbage collection go to @frutescens const activeKeys = this.scene.getActiveKeys(); // Removing unnecessary sprites from animation manager @@ -117,7 +118,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler { this.eggHatchData.length = 0; // Removes Pokemon icons in EggSummaryUiHandler this.iconAnimHandler.removeAll(); - console.log("Egg Summary Handler cleared"); } /** @@ -256,7 +256,6 @@ export default class EggSummaryUiHandler extends MessageUiHandler { if (phase instanceof EggSummaryPhase) { phase.end(); } - ui.revertMode(); success = true; } else { const count = this.eggHatchData.length;