1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

feat(mobile): enable wakelock on backup page (#11621)

This commit is contained in:
Saschl 2024-08-07 00:13:11 +02:00 committed by GitHub
parent 1dae622dbc
commit 745e1b003d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
};
},
[],
);