mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
CW-352 add enable disable screenshot feature to i os (#931)
* Disable ios screen recording * Minor Enhancements --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
OmarHatem
parent
43e062d1ac
commit
1e868f876e
@@ -8,7 +8,6 @@ import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
|
||||
import 'package:cake_wallet/view_model/settings/privacy_settings_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
class PrivacyPage extends BasePage {
|
||||
PrivacyPage(this._privacySettingsViewModel);
|
||||
@@ -49,13 +48,12 @@ class PrivacyPage extends BasePage {
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setShouldSaveRecipientAddress(value);
|
||||
}),
|
||||
if (Platform.isAndroid)
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.prevent_screenshots,
|
||||
value: _privacySettingsViewModel.isAppSecure,
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setIsAppSecure(value);
|
||||
}),
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.prevent_screenshots,
|
||||
value: _privacySettingsViewModel.isAppSecure,
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setIsAppSecure(value);
|
||||
}),
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.disable_buy,
|
||||
value: _privacySettingsViewModel.disableBuy,
|
||||
|
||||
@@ -23,7 +23,6 @@ import 'package:cake_wallet/monero/monero.dart';
|
||||
import 'package:cake_wallet/entities/action_list_display_mode.dart';
|
||||
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||
import 'package:cw_core/set_app_secure_native.dart';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
part 'settings_store.g.dart';
|
||||
|
||||
@@ -136,11 +135,11 @@ abstract class SettingsStoreBase with Store {
|
||||
(bool shouldSaveRecipientAddress) => sharedPreferences.setBool(
|
||||
PreferencesKey.shouldSaveRecipientAddressKey, shouldSaveRecipientAddress));
|
||||
|
||||
setIsAppSecureNative(isAppSecure);
|
||||
|
||||
reaction((_) => isAppSecure, (bool isAppSecure) {
|
||||
sharedPreferences.setBool(PreferencesKey.isAppSecureKey, isAppSecure);
|
||||
if (Platform.isAndroid) {
|
||||
setIsAppSecureNative(isAppSecure);
|
||||
}
|
||||
});
|
||||
|
||||
reaction(
|
||||
@@ -153,10 +152,6 @@ abstract class SettingsStoreBase with Store {
|
||||
(bool disableSell) => sharedPreferences.setBool(
|
||||
PreferencesKey.disableSellKey, disableSell));
|
||||
|
||||
if (Platform.isAndroid) {
|
||||
setIsAppSecureNative(isAppSecure);
|
||||
}
|
||||
|
||||
reaction(
|
||||
(_) => fiatApiMode,
|
||||
(FiatApiMode mode) =>
|
||||
|
||||
Reference in New Issue
Block a user