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 {