Skip to content

Commit

Permalink
fix: fixed un-necessary migration preferences from native to flutter …
Browse files Browse the repository at this point in the history
…bridge
  • Loading branch information
Desu Sai Venkat committed Dec 1, 2023
1 parent 761b5ce commit 7d5c455
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public long getLastEventTimestamp() {

public void migrateAppInfoPreferencesFromNative() {
SharedPreferences nativePrefs = this.context.getSharedPreferences(NATIVE_PREFS_NAME, Context.MODE_PRIVATE);
if (nativePrefs.contains(PREFS_KEY_BUILD_NUMBER)) {
if (!this.preferences.contains(PREFS_KEY_BUILD_NUMBER) && nativePrefs.contains(PREFS_KEY_BUILD_NUMBER)) {
saveBuildNumber(nativePrefs.getInt(PREFS_KEY_BUILD_NUMBER, -1));
}
if (nativePrefs.contains(PREFS_KEY_VERSION_NAME)) {
if (!this.preferences.contains(PREFS_KEY_VERSION_NAME) && nativePrefs.contains(PREFS_KEY_VERSION_NAME)) {
saveVersionName(nativePrefs.getString(PREFS_KEY_VERSION_NAME, null));
}
}
Expand Down

0 comments on commit 7d5c455

Please sign in to comment.