mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
Add network auto control feature for mobile platforms
Co-authored-by: monkeyWie <[email protected]>
This commit is contained in:
1 parent
25bf3ca65b
commit
431fdd0d54
7 files changed
+148
-1
No files matched your search
@@ -10,6 +10,7 @@ const String _windowState = 'windowState';
|
||||
const String _bookmark = 'bookmark';
|
||||
const String _createHistory = 'createHistory';
|
||||
const String _webToken = 'webToken';
|
||||
const String _networkAutoControl = 'networkAutoControl';
|
||||
|
||||
class Database {
|
||||
static final Database _instance = Database._internal();
|
||||
@@ -109,4 +110,12 @@ class Database {
|
||||
void clearCreateHistory() {
|
||||
clear(_createHistory);
|
||||
}
|
||||
|
||||
void saveNetworkAutoControl(bool enabled) {
|
||||
save<bool>(_networkAutoControl, enabled);
|
||||
}
|
||||
|
||||
bool getNetworkAutoControl() {
|
||||
return get<bool>(_networkAutoControl, (json) => json as bool) ?? false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user