Don't import current version value from backup

pull/935/head
Alex Baker 5 years ago
parent 6229c8f05c
commit d307c762d9

@ -4,6 +4,7 @@ import static com.todoroo.astrid.dao.TaskDao.TRANS_SUPPRESS_REFRESH;
import static com.todoroo.astrid.data.SyncFlags.GTASKS_SUPPRESS_SYNC;
import static org.tasks.backup.TasksJsonExporter.UTF_8;
import static org.tasks.data.Place.newPlace;
import static org.tasks.preferences.Preferences.P_CURRENT_VERSION;
import android.app.ProgressDialog;
import android.content.Context;
@ -239,6 +240,9 @@ public class TasksJsonImporter {
taskDao.updateParents();
for (Entry<String, Integer> entry : backupContainer.getIntPrefs().entrySet()) {
if (P_CURRENT_VERSION.equals(entry.getKey())) {
continue;
}
preferences.setInt(entry.getKey(), entry.getValue());
}
for (Entry<String, Long> entry : backupContainer.getLongPrefs().entrySet()) {

@ -44,7 +44,7 @@ import timber.log.Timber;
public class Preferences {
private static final String P_CURRENT_VERSION = "cv"; // $NON-NLS-1$
public static final String P_CURRENT_VERSION = "cv"; // $NON-NLS-1$
private static final String PREF_SORT_SORT = "sort_sort"; // $NON-NLS-1$

Loading…
Cancel
Save