Skip to content

Conversation

@PhilippvK
Copy link
Owner

Tests do not work at the moment.

TODOs:

  • Check how to handle incomplete Preferences (Only Server/Port exists,...)

Partially resolves Issue #75

TODO: Also save language setting after it was added to the Launcher
Dialog
Warning: currently incomplete (TODO: fix)
@PhilippvK PhilippvK requested a review from pehala November 24, 2020 11:19
return true;//instance.serverBox.isSelected();
}

public void loadPreferences() {
Copy link
Collaborator

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.

Copy link
Collaborator

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

@PhilippvK
Copy link
Owner Author

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!

@pehala
Copy link
Collaborator

pehala commented Dec 3, 2020

Its fine, I am currently in the same situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants