mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-09-26 17:03:05 +00:00
fix: redirect to login page after deleting account on Android (#6206)
This commit is contained in:
parent
53a2b7cb6e
commit
944da858a8
@ -172,7 +172,6 @@ class _DeleteAccountBottomSheetState extends State<_DeleteAccountBottomSheet> {
|
|||||||
context,
|
context,
|
||||||
controller.text.trim(),
|
controller.text.trim(),
|
||||||
isChecked.value,
|
isChecked.value,
|
||||||
onSuccess: () => Navigator.of(context).pop(),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const VSpace(12.0),
|
const VSpace(12.0),
|
||||||
|
@ -19,7 +19,7 @@ class Loading {
|
|||||||
|
|
||||||
if (hasStopped) {
|
if (hasStopped) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
Navigator.of(loadingContext!).pop();
|
Navigator.of(loadingContext!).maybePop();
|
||||||
loadingContext = null;
|
loadingContext = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
|||||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||||
import 'package:appflowy/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart';
|
import 'package:appflowy/plugins/document/presentation/editor_plugins/openai/widgets/loading.dart';
|
||||||
import 'package:appflowy/startup/startup.dart';
|
import 'package:appflowy/startup/startup.dart';
|
||||||
import 'package:appflowy/user/application/auth/auth_service.dart';
|
|
||||||
import 'package:appflowy/user/application/user_service.dart';
|
import 'package:appflowy/user/application/user_service.dart';
|
||||||
import 'package:appflowy/workspace/presentation/home/menu/sidebar/space/shared_widget.dart';
|
import 'package:appflowy/workspace/presentation/home/menu/sidebar/space/shared_widget.dart';
|
||||||
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
|
||||||
@ -209,7 +208,6 @@ Future<void> deleteMyAccount(
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!context.mounted) {
|
if (!context.mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -238,7 +236,6 @@ Future<void> deleteMyAccount(
|
|||||||
message: LocaleKeys
|
message: LocaleKeys
|
||||||
.newSettings_myAccount_deleteAccount_deleteAccountSuccess
|
.newSettings_myAccount_deleteAccount_deleteAccountSuccess
|
||||||
.tr(),
|
.tr(),
|
||||||
bottomPadding: bottomPadding,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// delay 1 second to make sure the toast notification is shown
|
// delay 1 second to make sure the toast notification is shown
|
||||||
@ -246,7 +243,6 @@ Future<void> deleteMyAccount(
|
|||||||
onSuccess?.call();
|
onSuccess?.call();
|
||||||
|
|
||||||
// restart the application
|
// restart the application
|
||||||
await getIt<AuthService>().signOut();
|
|
||||||
await runAppFlowy();
|
await runAppFlowy();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user