mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-25 16:30:03 +00:00
Revert "fix: loading exception when switching workspace"
This reverts commit 10a536b1a2e3100fa3da99ab05851702f701a3c0.
This commit is contained in:
parent
4634b51edf
commit
343f7e4fd5
@ -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…
x
Reference in New Issue
Block a user