Skip to content

Commit

Permalink
feat(mobile): enable wakelock on backup page (#11621)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl authored Aug 6, 2024
1 parent 1dae622 commit 745e1b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mobile/lib/pages/backup/backup_controller.page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -49,7 +50,11 @@ class BackupControllerPage extends HookConsumerWidget {
ref
.watch(websocketProvider.notifier)
.stopListenToEvent('on_upload_success');
return null;

WakelockPlus.enable();
return () {
WakelockPlus.disable();
};
},
[],
);
Expand Down

0 comments on commit 745e1b0

Please sign in to comment.