Skip to content

Commit

Permalink
Revert "Fix bug"
Browse files Browse the repository at this point in the history
This reverts commit ef43116.
  • Loading branch information
lifegpc authored Jun 2, 2024
1 parent ef43116 commit ca8fb15
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/dialog/new_download_task_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ class _NewDownloadTaskPage extends State<NewDownloadTaskPage> {
Widget build(BuildContext context) {
tryInitApi(context);
if (_ok) {
context.canPop() ? context.pop() : context.go("/task_manager");
WidgetsBinding.instance!.addPostFrameCallback((_) {
context.canPop() ? context.pop() : context.go("/task_manager");
});
}
if (!_fetched) fetchDefaultCfg();
final i18n = AppLocalizations.of(context)!;
Expand Down
4 changes: 3 additions & 1 deletion lib/dialog/new_export_zip_task_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ class _NewExportZipTaskPage extends State<NewExportZipTaskPage> {
Widget build(BuildContext context) {
tryInitApi(context);
if (_ok) {
context.canPop() ? context.pop() : context.go("/task_manager");
WidgetsBinding.instance!.addPostFrameCallback((_) {
context.canPop() ? context.pop() : context.go("/task_manager");
});
}
if (!_fetched) fetchDefaultCfg();
final i18n = AppLocalizations.of(context)!;
Expand Down
4 changes: 3 additions & 1 deletion lib/dialog/new_user_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class _NewUserPage extends State<NewUserPage> {
return Container();
}
if (_newUserId != null) {
context.canPop() ? context.pop() : context.go("/users");
SchedulerBinding.instance.addPostFrameCallback((_) {
context.canPop() ? context.pop() : context.go("/users");
});
return Container();
}
final i18n = AppLocalizations.of(context)!;
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ class _LoginPageState extends State<LoginPage>
tryInitApi(context);
_checkStatus(context);
if (isTop(context) && auth.user != null) {
context.canPop() ? context.pop() : context.go("/");
SchedulerBinding.instance.addPostFrameCallback((_) {
context.canPop() ? context.pop() : context.go("/");
});
}
return Scaffold(
appBar: AppBar(
Expand Down

0 comments on commit ca8fb15

Please sign in to comment.