From 5fd6ce21882a1c82955c19eac1df384dceeb9835 Mon Sep 17 00:00:00 2001 From: - <-> Date: Sat, 14 Sep 2024 14:44:25 +0200 Subject: [PATCH] chore: disable showing monerochan by default --- .../main/java/net/mynero/wallet/fragment/home/HomeFragment.kt | 2 +- .../net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt | 1 - .../mynero/wallet/fragment/onboarding/OnboardingViewModel.kt | 2 +- .../net/mynero/wallet/fragment/settings/SettingsFragment.kt | 2 +- app/src/main/java/net/mynero/wallet/util/Constants.kt | 2 ++ 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.kt b/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.kt index 4889485..02fa1dc 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.kt +++ b/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.kt @@ -220,7 +220,7 @@ class HomeFragment : Fragment(), TxInfoAdapterListener { view.findViewById(R.id.no_history_layout).visibility = if (display) View.VISIBLE else View.GONE val displayMonerochan = - PrefService.instance?.getBoolean(Constants.PREF_MONEROCHAN, true) == true + PrefService.instance?.getBoolean(Constants.PREF_MONEROCHAN, Constants.DEFAULT_PREF_MONEROCHAN) == true if (displayMonerochan) { botImageView.visibility = View.VISIBLE mnrjTextView.visibility = View.VISIBLE diff --git a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt index 255390a..0109a84 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt +++ b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.kt @@ -84,7 +84,6 @@ class OnboardingFragment : Fragment(), NodeSelectionDialogListener, AddNodeListe useBundledTor = view.findViewById(R.id.bundled_tor_checkbox) seedOffsetCheckbox?.isChecked = useOffset - showXmrchanSwitch?.isChecked = true val usingProxy = ProxyService.instance?.usingProxy == true val usingBundledTor = ProxyService.instance?.useBundledTor == true diff --git a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingViewModel.kt b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingViewModel.kt index b5e576f..c2de57b 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingViewModel.kt +++ b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingViewModel.kt @@ -31,7 +31,7 @@ class OnboardingViewModel : ViewModel() { private val _passphrase = MutableLiveData("") val passphrase: LiveData = _passphrase private val _confirmedPassphrase = MutableLiveData("") - private val _showMonerochan = MutableLiveData(true) + private val _showMonerochan = MutableLiveData(Constants.DEFAULT_PREF_MONEROCHAN) val showMonerochan: LiveData = _showMonerochan var showMoreOptions: LiveData = _showMoreOptions var seedType: LiveData = _seedType diff --git a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.kt b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.kt index e64d60c..2bdd7e6 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.kt +++ b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.kt @@ -87,7 +87,7 @@ class SettingsFragment : Fragment(), PasswordListener, NodeSelectionDialogListen streetModeSwitch?.isChecked = PrefService.instance?.getBoolean(Constants.PREF_STREET_MODE, false) == true monerochanSwitch?.isChecked = - PrefService.instance?.getBoolean(Constants.PREF_MONEROCHAN, true) == true + PrefService.instance?.getBoolean(Constants.PREF_MONEROCHAN, Constants.DEFAULT_PREF_MONEROCHAN) == true donationSwitch?.isChecked = PrefService.instance?.getBoolean(Constants.PREF_DONATE_PER_TX, false) == true useBundledTor?.isChecked = cachedUsingBundledTor diff --git a/app/src/main/java/net/mynero/wallet/util/Constants.kt b/app/src/main/java/net/mynero/wallet/util/Constants.kt index 169726c..be7e01d 100644 --- a/app/src/main/java/net/mynero/wallet/util/Constants.kt +++ b/app/src/main/java/net/mynero/wallet/util/Constants.kt @@ -21,6 +21,8 @@ object Constants { const val NAV_ARG_TXINFO = "nav_arg_txinfo" const val STREET_MODE_BALANCE = "#.############" + const val DEFAULT_PREF_MONEROCHAN = false + val DONATION_ADDRESSES = arrayOf( "87BqQYkugEzh6Tuyotm2uc3DzJzKM6MuZaC161e6u1TsQxxPmXVPHpdNRyK47JY4d1hhbe25YVz4e9vTXCLDxvHkRXEAeBC", // primary Mysu Donation address "89QoPxs4cQSGbJrJddwzV3Ca7s2gVYHE1Xd1hGZafuVJVyNKt2LCQhxUdBF57PemxQiX3dmGUZLRRAzfeYyh9pq3GiWsDVo", // second Mysu Donation address