Skip to content

Commit

Permalink
Merge pull request #159 from elimu-ai/model-2.0.73
Browse files Browse the repository at this point in the history
chore: upgrade to model 2.0.73
  • Loading branch information
jo-elimu authored Sep 25, 2024
2 parents bd3adfa + d8e427b commit 9de8c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ public static Language getLanguage(Context context) {
if (TextUtils.isEmpty(languageAsString)) {
return null;
} else {
Language language = Language.valueOf(languageAsString);
return language;
try {
return Language.valueOf(languageAsString);
} catch (IllegalArgumentException e) {
return null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void updateAppVersion(Context context) {

if (oldVersionCode < 3001020) {
Timber.w("oldVersionCode < 3001020");
// Handle renaming from "FIL" to "TGL"
// Handle renaming from Language.FIL to Language.TGL
SharedPreferences sharedPreferences = context.getSharedPreferences(SharedPreferencesHelper.SHARED_PREFS, Context.MODE_PRIVATE);
String languageAsString = sharedPreferences.getString(SharedPreferencesHelper.PREF_LANGUAGE, null);
Timber.w("languageAsString: " + languageAsString);
Expand Down

0 comments on commit 9de8c37

Please sign in to comment.