mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 19:49: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) {
|
switch (call.method) {
|
||||||
case "enableWakeScreen":
|
case "enableWakeScreen":
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
handler.post(() -> result.success("screen wake turned ON"));
|
handler.post(() -> result.success(true));
|
||||||
break;
|
break;
|
||||||
case "disableWakeScreen":
|
case "disableWakeScreen":
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
handler.post(() -> result.success("screen wake turned OFF"));
|
handler.post(() -> result.success(true));
|
||||||
break;
|
break;
|
||||||
case "sec_random":
|
case "sec_random":
|
||||||
int count = call.argument("count");
|
int count = call.argument("count");
|
||||||
|
|
|
@ -42,11 +42,11 @@ public class MainActivity extends FlutterFragmentActivity {
|
||||||
switch (call.method) {
|
switch (call.method) {
|
||||||
case "enableWakeScreen":
|
case "enableWakeScreen":
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
handler.post(() -> result.success("screen wake turned ON"));
|
handler.post(() -> result.success(true));
|
||||||
break;
|
break;
|
||||||
case "disableWakeScreen":
|
case "disableWakeScreen":
|
||||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
handler.post(() -> result.success("screen wake turned ON"));
|
handler.post(() -> result.success(true));
|
||||||
break;
|
break;
|
||||||
case "sec_random":
|
case "sec_random":
|
||||||
int count = call.argument("count");
|
int count = call.argument("count");
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
func enableWakeScreen() -> String {
|
func enableWakeScreen() -> Bool{
|
||||||
UIApplication.shared.isIdleTimerDisabled = true
|
UIApplication.shared.isIdleTimerDisabled = true
|
||||||
|
|
||||||
return "screen wake turned ON"
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func disableWakeScreen() -> String{
|
func disableWakeScreen() -> Bool{
|
||||||
UIApplication.shared.isIdleTimerDisabled = false
|
UIApplication.shared.isIdleTimerDisabled = false
|
||||||
return "screen wake turned OFF"
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ void startWalletSyncStatusChangeReaction(
|
||||||
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
|
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
|
||||||
TransactionInfo>
|
TransactionInfo>
|
||||||
wallet) {
|
wallet) {
|
||||||
final WakeLock _wakeLock = getIt.get<WakeLock>();
|
final _wakeLock = getIt.get<WakeLock>();
|
||||||
_onWalletSyncStatusChangeReaction?.reaction?.dispose();
|
_onWalletSyncStatusChangeReaction?.reaction?.dispose();
|
||||||
_onWalletSyncStatusChangeReaction =
|
_onWalletSyncStatusChangeReaction =
|
||||||
reaction((_) => wallet.syncStatus, (SyncStatus status) async {
|
reaction((_) => wallet.syncStatus, (SyncStatus status) async {
|
||||||
|
|
Loading…
Reference in a new issue