mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-20 10:54:22 +08:00
@@ -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)!;
|
||||
|
||||
@@ -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)!;
|
||||
|
||||
@@ -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)!;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user