mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
fix issues from PR
This commit is contained in:
parent
e84f122956
commit
c70ced70dd
4 changed files with 9 additions and 9 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue