mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 09:17:37 +00:00
use wakelock on fusion progress view / dialog
revert desktop changes
This commit is contained in:
parent
e8a2a5081b
commit
ba8215a3d3
1 changed files with 11 additions and 0 deletions
|
@ -12,6 +12,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:wakelock/wakelock.dart';
|
||||
|
||||
import '../../pages_desktop_specific/cashfusion/sub_widgets/fusion_progress.dart';
|
||||
import '../../providers/cash_fusion/fusion_progress_ui_state_provider.dart';
|
||||
|
@ -84,6 +85,8 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
message: "Stopping fusion",
|
||||
);
|
||||
|
||||
await Wakelock.disable();
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -96,6 +99,12 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
Wakelock.disable();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool _succeeded =
|
||||
|
@ -108,6 +117,8 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
.watch(fusionProgressUIStateProvider(widget.walletId))
|
||||
.fusionRoundsCompleted;
|
||||
|
||||
Wakelock.enable();
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return await _requestAndProcessCancel();
|
||||
|
|
Loading…
Reference in a new issue