From 98598e205b3fe579d1de4091a4f646c09e8637dd Mon Sep 17 00:00:00 2001 From: Sascha Date: Tue, 6 Aug 2024 22:10:54 +0200 Subject: [PATCH] feat: enable wakelock on backup page --- mobile/lib/pages/backup/backup_controller.page.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/lib/pages/backup/backup_controller.page.dart b/mobile/lib/pages/backup/backup_controller.page.dart index 61a6bc1bb9efa..86cd8b2baa01f 100644 --- a/mobile/lib/pages/backup/backup_controller.page.dart +++ b/mobile/lib/pages/backup/backup_controller.page.dart @@ -18,6 +18,7 @@ import 'package:immich_mobile/providers/websocket.provider.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/widgets/backup/backup_info_card.dart'; import 'package:immich_mobile/widgets/backup/current_backup_asset_info_box.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; @RoutePage() class BackupControllerPage extends HookConsumerWidget { @@ -49,7 +50,11 @@ class BackupControllerPage extends HookConsumerWidget { ref .watch(websocketProvider.notifier) .stopListenToEvent('on_upload_success'); - return null; + + WakelockPlus.enable(); + return () { + WakelockPlus.disable(); + }; }, [], );