fix(angular): swiping back quickly no longer causes app to get stuck (#23125)

resolves #15154
This commit is contained in:
capc0
2021-04-01 15:57:04 +02:00
committed by GitHub
parent b7b97ce4cc
commit 28c52fd4e3
2 changed files with 6 additions and 1 deletions

View File

@ -232,6 +232,10 @@ export class StackController {
return this.activeView ? this.activeView.stackId : undefined;
}
hasRunningTask(): boolean {
return this.runningTask !== undefined;
}
destroy() {
this.containerEl = undefined!;
this.views.forEach(destroyView);
@ -294,6 +298,7 @@ export class StackController {
this.runningTask = undefined;
}
const promise = this.runningTask = task();
promise.finally(() => this.runningTask = undefined);
return promise;
}
}