Prefs fix

pull/14/head 4.4.4.1
Sam Bosley 13 years ago
parent 4f28a9addc
commit 7e98b76c43

@ -87,15 +87,19 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_calendar_reminders, true); Preferences.setIfUnset(prefs, editor, r, R.string.p_calendar_reminders, true);
SharedPreferences publicPrefs = getPublicPrefs(context); String dragDropTestInitialized = "android_drag_drop_initialized"; //$NON-NLS-1$
if (publicPrefs != null) { if (!Preferences.getBoolean(dragDropTestInitialized, false)) {
Editor edit = publicPrefs.edit(); SharedPreferences publicPrefs = getPublicPrefs(context);
if (edit != null) { if (publicPrefs != null) {
edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP); Editor edit = publicPrefs.edit();
edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO); if (edit != null) {
edit.commit(); edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP);
Preferences.setInt(P_SUBTASKS_HELP, 1); edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO);
edit.commit();
Preferences.setInt(P_SUBTASKS_HELP, 1);
}
} }
Preferences.setBoolean(dragDropTestInitialized, true);
} }
if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default
@ -152,15 +156,19 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_show_list_members, false); Preferences.setIfUnset(prefs, editor, r, R.string.p_show_list_members, false);
SharedPreferences publicPrefs = getPublicPrefs(context); String dragDropTestInitialized = "android_drag_drop_initialized"; //$NON-NLS-1$
if (publicPrefs != null) { if (!Preferences.getBoolean(dragDropTestInitialized, false)) {
Editor edit = publicPrefs.edit(); SharedPreferences publicPrefs = getPublicPrefs(context);
if (edit != null) { if (publicPrefs != null) {
edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP); Editor edit = publicPrefs.edit();
edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO); if (edit != null) {
edit.commit(); edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP);
Preferences.setInt(P_SUBTASKS_HELP, 1); edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO);
edit.commit();
Preferences.setInt(P_SUBTASKS_HELP, 1);
}
} }
Preferences.setBoolean(dragDropTestInitialized, true);
} }
BeastModePreferences.setDefaultLiteModeOrder(context); BeastModePreferences.setDefaultLiteModeOrder(context);

Loading…
Cancel
Save