Commit 997ced13 authored by Leonardo Aramaki's avatar Leonardo Aramaki

RocketChatService does not clear all shared prefs anymore upon disconnecting from a host

parent ab60e28a
...@@ -93,8 +93,6 @@ public class RocketChatService extends Service implements ConnectivityServiceInt ...@@ -93,8 +93,6 @@ public class RocketChatService extends Service implements ConnectivityServiceInt
webSocketThreads.remove(hostname); webSocketThreads.remove(hostname);
// remove RealmConfiguration key from HashMap // remove RealmConfiguration key from HashMap
RealmStore.sStore.remove(hostname); RealmStore.sStore.remove(hostname);
// clear "cache" SharedPreference
this.getSharedPreferences("cache", 0).edit().clear().apply();
// start a fresh new MainActivity // start a fresh new MainActivity
Intent intent = new Intent(this, MainActivity.class); Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment