fix: do not call WakeLock on Web (mobile) (#7668)

* fix: do not call WakeLock on Web (mobile)

* fix: do not call WakeLock on Web (mobile) - replaced isMobile by !isWeb
This commit is contained in:
Tom-Brian Garcia 2024-04-10 15:32:05 +02:00 committed by GitHub
parent 6ba6a16836
commit c972452310
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,7 +68,9 @@ class _RemotePageState extends State<RemotePage> {
gFFI.dialogManager
.showLoading(translate('Connecting...'), onCancel: closeConnection);
});
WakelockPlus.enable();
if (!isWeb) {
WakelockPlus.enable();
}
_physicalFocusNode.requestFocus();
gFFI.inputModel.listenToMouse(true);
gFFI.qualityMonitorModel.checkShowQualityMonitor(sessionId);
@ -95,7 +97,9 @@ class _RemotePageState extends State<RemotePage> {
gFFI.dialogManager.dismissAll();
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
overlays: SystemUiOverlay.values);
await WakelockPlus.disable();
if (!isWeb) {
await WakelockPlus.disable();
}
await keyboardSubscription.cancel();
removeSharedStates(widget.id);
}