feat: general wake lock (#347)

This commit is contained in:
lollipopkit
2024-05-07 15:48:08 +08:00
parent d0523c1e54
commit f70449d67d
9 changed files with 59 additions and 40 deletions

View File

@@ -80,7 +80,7 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
_showHelp();
await _initTerminal();
if (Stores.setting.wakeLock.fetch()) WakelockPlus.enable();
if (Stores.setting.sshWakeLock.fetch()) WakelockPlus.enable();
});
}
@@ -90,7 +90,7 @@ class _SSHPageState extends State<SSHPage> with AutomaticKeepAliveClientMixin {
_virtKeyLongPressTimer?.cancel();
_terminalController.dispose();
_discontinuityTimer?.cancel();
WakelockPlus.disable();
if (!Stores.setting.generalWakeLock.fetch()) WakelockPlus.disable();
}
@override