[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake-mobile/master] Changed ET summary to null when switch is off in preference
commit 9961ca58cafe88f831cb2958b7c1ee2e65a5d1d2
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
Date: Fri Jul 24 13:47:22 2020 +0530
Changed ET summary to null when switch is off in preference
---
.../org/torproject/snowflake/fragments/AppSettingsFragment.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/org/torproject/snowflake/fragments/AppSettingsFragment.java b/app/src/main/java/org/torproject/snowflake/fragments/AppSettingsFragment.java
index 409625a..528d8b5 100644
--- a/app/src/main/java/org/torproject/snowflake/fragments/AppSettingsFragment.java
+++ b/app/src/main/java/org/torproject/snowflake/fragments/AppSettingsFragment.java
@@ -60,9 +60,12 @@ public class AppSettingsFragment extends PreferenceFragmentCompat implements Sha
if (!previousValue.equals(""))
editTextPreference.setSummary(previousValue); //When Switch is turned on set the summary to previously set Value.
else
- editTextPreference.setSummary(SettingsConstants.DEFAULT); //If there is no previous value, then using null.
+ editTextPreference.setSummary(SettingsConstants.DEFAULT); //If there is no previous value, then using default.
} else {
- findPreference(key).setSummary(SettingsConstants.DEFAULT); //Default is shown when switch is off.
+ //Default is shown when switch is off.
+ findPreference(key).setSummary(SettingsConstants.DEFAULT);
+ //When the switch is off the edit-text won't show any summary. Because it already signifies that the app is using default.
+ editTextPreference.setSummary("");
}
} else {
//It's an Edit Text
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits