mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Bug fix
This commit is contained in:
@@ -357,7 +357,11 @@ void checkAuth(BuildContext context) {
|
|||||||
if (!re) {
|
if (!re) {
|
||||||
if (auth.status!.noUser && prefs.getBool("skipCreateRootUser") == true)
|
if (auth.status!.noUser && prefs.getBool("skipCreateRootUser") == true)
|
||||||
return;
|
return;
|
||||||
context.push(auth.status!.noUser ? "/create_root_user" : "/login");
|
final loc = auth.status!.noUser ? "/create_root_user" : "/login";
|
||||||
|
final path = GoRouterState.of(context).path;
|
||||||
|
if (path != loc) {
|
||||||
|
context.push(loc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catchError((err) {
|
}).catchError((err) {
|
||||||
_authLog.log(Level.SEVERE, "Failed to check auth info:", err);
|
_authLog.log(Level.SEVERE, "Failed to check auth info:", err);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class TaskManager {
|
|||||||
void clear() {
|
void clear() {
|
||||||
tasks.clear();
|
tasks.clear();
|
||||||
tasksList.clear();
|
tasksList.clear();
|
||||||
_channel?.stream.drain();
|
_channel?.sink.add("{\"type\":\"close\"}");
|
||||||
_channel?.sink.close();
|
_channel?.sink.close();
|
||||||
_closed = true;
|
_closed = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user