-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Provide possibility to verify login data in settings #210
Conversation
Can one of the admins verify this patch? |
@bekuno Can I somehow disable the CI Bot until this is out of WIP/Draft state. I think that would save you some resources. |
@SchoolGuy Not a big issue. It will do nothing until we give it the OK. So tell when ready, then we trigger the CI. |
@Lineflyer Okay thanks for the info. I will remove the WIP progress and convert it to a "ready" PR when I am done. |
Okay this was laying around. But I am starting to now dive into how this is done. The implementation of the Settings in WhereYouGo are so custom that I will just rewrite this. It works yes but it is ugly as hell. There are shared Preferences for a reason and then why not just use them. Currently we do this in custom classes etc. Also our Folder Picker is not updated and won't work on Fragments, thus this needs also to be changed. So this will take a while until I can fix all of that. BUT all of this means that we will get a huge modernization of the app, allowing us to be more aligned with other changed from Android. |
@SchoolGuy This sounds very good. A modernization of the app is needed and welcome. |
Lol. Just found out that we are not using |
Okay new TODO list to get the button we actually want with this PR:
|
Just to amuse the rest reading this... clearPackageFromMemory(); // XXX not work on 2.2 and higher!!! As far as I understand this comment we have code which is worrying about clearing up the memory on Android 2.2. I think We can safely remove this. Can't we? 😂 |
Commit 4e342f3 makes it possible to navigate through the settings again. BUT header bar is missing, edit is not tested, preview was deleted and I didn't check for any new bugs caused by changed to the |
@bekuno I think I am now deep enough in the code to understand what is vaguely done where... How much should I separate my efforts to fix tech-debt and fix the issue of checking the login data? Or should I just smash everything in here? |
Please divide the changes into parts as small as possible and reasonable. This facilitates the evaluation and a possibly necessary troubleshooting. I have noticed some sub areas of this PR, for example
These are such typical single PR topics. |
So if we ignore the commits which are related to just removing literal dead code then all of this is directly related to this PR. |
But I understand your point and will try to seperate as much as possible. |
Here is an overview of what got changed by this pull request: Issues
======
+ Solved 16
Complexity increasing per file
==============================
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsLocalizationFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsLocationFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsDirectionsFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsGlobalFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsCompassFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsHiddenFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsCredentialsFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/SettingsAppearanceFragment.java 1
- src/main/java/menion/android/whereyougo/gui/fragments/settings/WhereYouGoSettingsFragment.java 1
Complexity decreasing per file
==============================
+ src/main/java/menion/android/whereyougo/gui/activity/XmlSettingsActivity.java -49
See the complete overview on Codacy |
That would be fine. |
One last note: We generate a file called |
I force pushed because now only #240 is missing before this one. This PR currently shows the button but it has no functionality because I need to check how we are going to find out if the data is correct. |
I will continue to work on this starting tomorrow. |
I did rebase this on |
@bekuno & @Lineflyer & other people of interest... Okay so my rebase did mess up the code a bit. I am currently trying to fix the code again so the login check works. While I am doing this... What is your opinion on having a round one of these boys fading one of those on success. On failure I would obviously do the some with a cross. Second thought: Should I save the result of the check and display it the next time the user visits this page or do we want to display the result of the check only on button click? |
^ For context: I am not using the Progress Dialog due to this Deprecation Warning: https://developer.android.com/reference/android/app/ProgressDialog |
Okay that was quick... I didn't expect that. The code now works. But no user feedback is implemented on the button click yet. |
src/main/java/menion/android/whereyougo/gui/activity/MainActivity.java
Outdated
Show resolved
Hide resolved
So due to some GC.com problems I can't test the positive side of the code but I think this is now read.y |
@bekuno Ping again? |
loginCheckdialog.setMessage("Init"); | ||
break; | ||
case PING: | ||
loginCheckdialog.setMessage("Pinging"); | ||
break; | ||
case LOGIN: | ||
loginCheckdialog.setMessage("Logging in"); | ||
break; | ||
case LOGOUT: | ||
loginCheckdialog.setMessage("Logging out"); | ||
break; | ||
default: | ||
loginCheckdialog.setMessage("Something unexpected happened. Please close the dialog!"); | ||
break; | ||
} | ||
break; | ||
default: | ||
loginCheckdialog.setMessage("Something unexpected happened. Please close the dialog!"); |
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 user visible string should be translated strings.
Is there a different behavior between the message "Logging in" (and other) and the defaults?
I dont understand, why "Please close the dialog!" is necessary.
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.
In case for example that we receive a network disconnect or a networked changed event, the Task can't finish and the network possibly will throw a stacktrace, thus the error message for the user. Since we define the well known states inside the case
, we want to catch all other situations to be safe on the usability side.
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.
In the error situation you set the Button text to pref_gc_check_dialog_negative_button_close, the same as in the success situation.
The text "Please close the dialog!" is is therefore superfluous.
The login check works really fine :-). I love it. |
@bekuno To keep the Git History vaguely clean I force pushed. Plelase re-review... :) |
@bekuno Ping? |
Wanted to clean the Git History for that space and accidently removed your commits @bekuno |
new changed with web editor. |
@bekuno I think this is clean and ready now to be merged. If I forgot something, please point me to it. |
@bekuno Ping? |
@bekuno Ping again? |
I tested yesterday a bit. |
@bekuno Fixed and tested |
@bekuno Ping? |
@bekuno I really would like to get this merged soon. It is open way too long for my liking... |
@bekuno Ping? |
Lets merge to do further testing. @bekuno Hope its OK for you...but indeed this PR is open to long and I guess @SchoolGuy will anyway continue to work on it if there are any deficiencies left. |
@Lineflyer It' s fine for me. I have had not much time, therefore I concentrated my work to c:geo. |
@bekuno I am aware but I will first focus on cgeo/cgeo#11298 so I don't open to many PRs at once. A day has only 24h for as well. |
That's perfect. |
This fixes #188
I will extend this once I have something presentable.