mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 06:37:14 -04:00
Revert "fix: loading exception when switching workspace"
This reverts commit 10a536b1a2
.
This commit is contained in:
parent
4634b51edf
commit
343f7e4fd5
2 changed files with 4 additions and 13 deletions
|
@ -40,11 +40,7 @@ class Loading {
|
|||
|
||||
void stop() {
|
||||
if (loadingContext != null) {
|
||||
if (loadingContext!.mounted) {
|
||||
if (Navigator.canPop(loadingContext!)) {
|
||||
Navigator.of(loadingContext!).pop();
|
||||
}
|
||||
}
|
||||
Navigator.of(loadingContext!).pop();
|
||||
loadingContext = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,7 @@ class _SidebarWorkspaceState extends State<SidebarWorkspace> {
|
|||
@override
|
||||
void dispose() {
|
||||
onHover.dispose();
|
||||
if (loadingIndicator != null) {
|
||||
loadingIndicator?.stop();
|
||||
loadingIndicator = null;
|
||||
}
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
@ -103,10 +100,8 @@ class _SidebarWorkspaceState extends State<SidebarWorkspace> {
|
|||
if (isLoading) {
|
||||
loadingIndicator ??= Loading(context)..start();
|
||||
return;
|
||||
} else if (loadingIndicator != null) {
|
||||
if (mounted) {
|
||||
loadingIndicator?.stop();
|
||||
}
|
||||
} else {
|
||||
loadingIndicator?.stop();
|
||||
loadingIndicator = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue