Set default update interval for fresh installations

This commit is contained in:
Martin Fietz 2016-01-17 13:40:55 +01:00
parent d487949a36
commit b8c1abf99b

View File

@ -224,6 +224,9 @@ public class MainActivity extends AppCompatActivity implements NavDrawerActivity
if (prefs.getBoolean(PREF_IS_FIRST_LAUNCH, true)) { if (prefs.getBoolean(PREF_IS_FIRST_LAUNCH, true)) {
new Handler().postDelayed(() -> drawerLayout.openDrawer(navDrawer), 1500); new Handler().postDelayed(() -> drawerLayout.openDrawer(navDrawer), 1500);
// for backward compatibility, we only change defaults for fresh installs
UserPreferences.setUpdateInterval(12);
SharedPreferences.Editor edit = prefs.edit(); SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean(PREF_IS_FIRST_LAUNCH, false); edit.putBoolean(PREF_IS_FIRST_LAUNCH, false);
edit.commit(); edit.commit();