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