Merge pull request #8546 from osmandapp/Fix_favorite_migrate_npe
Fix favorite migrate npe
This commit is contained in:
commit
b548162ddd
1 changed files with 12 additions and 4 deletions
|
@ -203,10 +203,18 @@ public class AppInitializer implements IProgress {
|
|||
if (prevAppVersion < VERSION_3_5 || Version.getAppVersion(app).equals("3.5.3")
|
||||
|| Version.getAppVersion(app).equals("3.5.4")) {
|
||||
app.getSettings().migratePreferences();
|
||||
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_5).commit();
|
||||
}
|
||||
if (prevAppVersion < VERSION_3_5 || Version.getAppVersion(app).equals("3.5.3")) {
|
||||
app.getSettings().migrateHomeWorkParkingToFavorites();
|
||||
addListener(new AppInitializeListener() {
|
||||
@Override
|
||||
public void onProgress(AppInitializer init, InitEvents event) {
|
||||
if (event.equals(InitEvents.FAVORITES_INITIALIZED)) {
|
||||
app.getSettings().migrateHomeWorkParkingToFavorites();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(AppInitializer init) {
|
||||
}
|
||||
});
|
||||
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_3_5).commit();
|
||||
}
|
||||
if (prevAppVersion < VERSION_3_6) {
|
||||
|
|
Loading…
Reference in a new issue