Skip to content

Commit

Permalink
Move preferences.getString to variable for clarity
Browse files Browse the repository at this point in the history
* Move preferences.getString to variable instead of if statement for clarity in LanguageContext constructor
  • Loading branch information
tanaynigam committed May 25, 2021
1 parent 27343e3 commit 89300fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public static LanguageContext getInstance() {

public LanguageContext(OSSharedPreferences preferences) {
instance = this;
if (preferences.getString(
preferences.getPreferencesName(), PREFS_OS_LANGUAGE, null) != null) {
String languageAppDefined = preferences.getString(preferences.getPreferencesName(), PREFS_OS_LANGUAGE, null);
if (languageAppDefined != null) {
this.strategy = new LanguageProviderAppDefined(preferences);
}
else {
Expand Down

0 comments on commit 89300fd

Please sign in to comment.