-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made connectivity card message optional #310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! I'm always surprised how much such a (rather small and helpful?) hint can bother users 😅😂
I've added some comments, especially suggested some strings written more from user perspective
app/src/main/res/values/strings.xml
Outdated
@@ -54,6 +54,8 @@ | |||
<string name="keep_on_title">Keep screen on while transferring</string> | |||
<string name="floating_text_selection_title">Floating text selection</string> | |||
<string name="floating_text_selection_summary">When selecting text in other apps, an option \"Send with Snapdrop\" will be shown</string> | |||
<string name="show_connectivity_card_title">Display connectivity card</string> | |||
<string name="show_connectivity_card_summary"> Card to notify you that you need to pair or connect to the same wifi</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like:
Show a warning when you are not connected with a WiFi network
app/src/main/res/values/strings.xml
Outdated
@@ -54,6 +54,8 @@ | |||
<string name="keep_on_title">Keep screen on while transferring</string> | |||
<string name="floating_text_selection_title">Floating text selection</string> | |||
<string name="floating_text_selection_summary">When selecting text in other apps, an option \"Send with Snapdrop\" will be shown</string> | |||
<string name="show_connectivity_card_title">Display connectivity card</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just "Connectivity banner"?
Users might not know what a "card" UI element is, and that enabled = show
is pretty self-explanatory IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed a small change: "Display connectivity warning" to "Connectivity warning" which is a bit shorter...
final Preference showConnectivityCardPref = findPreference(getString(R.string.pref_show_connectivity_card)); | ||
|
||
showConnectivityCardPref.setVisible(true); | ||
showConnectivityCardPref.setOnPreferenceChangeListener((pref, newValue) -> { | ||
|
||
PreferenceManager.getDefaultSharedPreferences(getContext()).edit().putBoolean(showConnectivityCardPref.getKey(), (boolean) newValue).apply(); | ||
return true; | ||
}); | ||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole code part is not necessary, the android Preferences
framework will automatically store preference changes for you ;-)
I pushed a new commit fixing the things you mentioned.
Well yes, everything that's not necessary is annoying one way or another. Unless it's a gif of a cat running back and forward with a usb stick. |
It will cost you 2 bites per second. |
Thanks again for your contribution! |
No problem! Awesome App. |
Made connectivity card message optional
The connectivity card shows every time you are on a mobile network. This would be useful for first time users but using the app often just becomes an annoyance. You already know how it works, why should you be stuck with an immutable notification. This PR solves the problem by adding an option in the settings menu to disable the connectivity card from showing.