mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Return homepage if is already logined when visit login page.
Store cookies information to cookies subdirectory on Windows
This commit is contained in:
@@ -9,6 +9,8 @@ class AuthInfo {
|
||||
ServerStatus? _status;
|
||||
ServerStatus? get status => _status;
|
||||
bool get isAuthed => (_user != null);
|
||||
bool _checked = false;
|
||||
bool get checked => _checked;
|
||||
|
||||
Future<void> getServerStatus() async {
|
||||
_status = (await api.getStatus()).unwrap();
|
||||
@@ -21,6 +23,7 @@ class AuthInfo {
|
||||
} else {
|
||||
_user = null;
|
||||
}
|
||||
_checked = true;
|
||||
await getServerStatus();
|
||||
return re.ok;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user