mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-13 17:51:57 +00:00
parent
ac401934f4
commit
070f625aaa
1 changed files with 4 additions and 0 deletions
|
|
@ -140,8 +140,12 @@ public class HabiticaApplication extends Application {
|
||||||
public static void logout(Context context) {
|
public static void logout(Context context) {
|
||||||
Instance.deleteDatabase(HabitDatabase.NAME);
|
Instance.deleteDatabase(HabitDatabase.NAME);
|
||||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean use_reminder = preferences.getBoolean("use_reminder", false);
|
||||||
|
String reminder_time = preferences.getString("reminder_time", "");
|
||||||
SharedPreferences.Editor editor = preferences.edit();
|
SharedPreferences.Editor editor = preferences.edit();
|
||||||
editor.clear();
|
editor.clear();
|
||||||
|
editor.putBoolean("use_reminder", use_reminder);
|
||||||
|
editor.putString("reminder_time", reminder_time);
|
||||||
editor.commit();
|
editor.commit();
|
||||||
Intent intent = new Intent(context, LoginActivity.class);
|
Intent intent = new Intent(context, LoginActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue