From 0df2b02ad5544425248175bdfcfe25858958e094 Mon Sep 17 00:00:00 2001 From: loewenzahm Date: Mon, 7 Feb 2022 22:24:29 +0100 Subject: [PATCH] [Bugfix] Fix logout bug On a logout the login-key has not been removed from the shared preferences due to a typo ("loginkey" instead of "loginKey"). Now that the typo is fixed the login key is no longer kept stored after logouts which resolves the bug mentioned in issue #16 --- .../main/java/com/example/hochi/nextcompanion/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/hochi/nextcompanion/MainActivity.java b/app/src/main/java/com/example/hochi/nextcompanion/MainActivity.java index 5ec0d77..ee51d6e 100644 --- a/app/src/main/java/com/example/hochi/nextcompanion/MainActivity.java +++ b/app/src/main/java/com/example/hochi/nextcompanion/MainActivity.java @@ -81,7 +81,7 @@ public class MainActivity extends AppCompatActivity implements AsyncTaskCallback if (id == R.id.action_logout) { SharedPreferences sharedPref = getSharedPreferences("persistence", MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); - editor.remove("loginkey"); + editor.remove("loginKey"); editor.apply(); Intent intent = new Intent(this, LoginActivity.class); startActivity(intent);