-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
WIP: Persistent preferences #76
base: master
Are you sure you want to change the base?
Conversation
Partially resolves Issue #75 TODO: Also save language setting after it was added to the Launcher Dialog
Warning: currently incomplete (TODO: fix)
@@ -49,6 +55,42 @@ public static boolean isUsingCustomServer() { | |||
return true;//instance.serverBox.isSelected(); | |||
} | |||
|
|||
public void loadPreferences() { |
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.
I would move all this Preferences logic into a separate class and add getters/setters for individual properties, this way we can handle all the logic for one property being unknown there. It will be also easier to test, since we could be mocking individual methods in that new class instead of the entire properties.
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.
Getters could return Optional and the individual getters could work like this:
- Is the property in loaded properties?
- Yes, return the property
- Not, return empty Optional
Sorry but I have to delay further work to a later point in time. I am currently not able to invest time in the project. Sorry for that! |
Its fine, I am currently in the same situation |
Tests do not work at the moment.
TODOs: