fix issues from PR

This commit is contained in:
Godwin Asuquo 2022-01-24 16:21:52 +01:00
parent e84f122956
commit c70ced70dd
4 changed files with 9 additions and 9 deletions

View file

@ -42,11 +42,11 @@ public class MainActivity extends FlutterFragmentActivity {
switch (call.method) {
case "enableWakeScreen":
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
handler.post(() -> result.success("screen wake turned ON"));
handler.post(() -> result.success(true));
break;
case "disableWakeScreen":
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
handler.post(() -> result.success("screen wake turned OFF"));
handler.post(() -> result.success(true));
break;
case "sec_random":
int count = call.argument("count");

View file

@ -42,11 +42,11 @@ public class MainActivity extends FlutterFragmentActivity {
switch (call.method) {
case "enableWakeScreen":
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
handler.post(() -> result.success("screen wake turned ON"));
handler.post(() -> result.success(true));
break;
case "disableWakeScreen":
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
handler.post(() -> result.success("screen wake turned ON"));
handler.post(() -> result.success(true));
break;
case "sec_random":
int count = call.argument("count");

View file

@ -8,13 +8,13 @@
import Foundation
import UIKit
func enableWakeScreen() -> String {
func enableWakeScreen() -> Bool{
UIApplication.shared.isIdleTimerDisabled = true
return "screen wake turned ON"
return true
}
func disableWakeScreen() -> String{
func disableWakeScreen() -> Bool{
UIApplication.shared.isIdleTimerDisabled = false
return "screen wake turned OFF"
return true
}

View file

@ -14,7 +14,7 @@ void startWalletSyncStatusChangeReaction(
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
TransactionInfo>
wallet) {
final WakeLock _wakeLock = getIt.get<WakeLock>();
final _wakeLock = getIt.get<WakeLock>();
_onWalletSyncStatusChangeReaction?.reaction?.dispose();
_onWalletSyncStatusChangeReaction =
reaction((_) => wallet.syncStatus, (SyncStatus status) async {