From c70ced70dd763ec2f79930ea57c5b15832ab1514 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Mon, 24 Jan 2022 16:21:52 +0100 Subject: [PATCH] fix issues from PR --- .../java/com/cakewallet/cake_wallet/MainActivity.java | 4 ++-- .../app/src/main/java/com/monero/app/MainActivity.java | 4 ++-- ios/CakeWallet/wakeLock.swift | 8 ++++---- lib/reactions/on_wallet_sync_status_change.dart | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java b/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java index d0453f571..141c26944 100644 --- a/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java +++ b/android/app/src/main/java/com/cakewallet/cake_wallet/MainActivity.java @@ -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"); diff --git a/android/app/src/main/java/com/monero/app/MainActivity.java b/android/app/src/main/java/com/monero/app/MainActivity.java index 0ee3d4dd5..385932b38 100644 --- a/android/app/src/main/java/com/monero/app/MainActivity.java +++ b/android/app/src/main/java/com/monero/app/MainActivity.java @@ -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"); diff --git a/ios/CakeWallet/wakeLock.swift b/ios/CakeWallet/wakeLock.swift index efd65fdb8..35f23eafa 100644 --- a/ios/CakeWallet/wakeLock.swift +++ b/ios/CakeWallet/wakeLock.swift @@ -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 } diff --git a/lib/reactions/on_wallet_sync_status_change.dart b/lib/reactions/on_wallet_sync_status_change.dart index f2c2d07cc..bb245898c 100644 --- a/lib/reactions/on_wallet_sync_status_change.dart +++ b/lib/reactions/on_wallet_sync_status_change.dart @@ -14,7 +14,7 @@ void startWalletSyncStatusChangeReaction( WalletBase, TransactionInfo> wallet) { - final WakeLock _wakeLock = getIt.get(); + final _wakeLock = getIt.get(); _onWalletSyncStatusChangeReaction?.reaction?.dispose(); _onWalletSyncStatusChangeReaction = reaction((_) => wallet.syncStatus, (SyncStatus status) async {