mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-26 17:15:01 +01:00
logout bug fix
This commit is contained in:
parent
bef82da590
commit
d0fd46c21d
@ -210,7 +210,7 @@ public class AppSettings extends AppCompatActivity implements OnClickListener,
|
||||
.setPositiveButton(R.string.yes_confirm, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
settings.logout();
|
||||
settings.logout(getApplicationContext());
|
||||
TwitterEngine.destroyInstance();
|
||||
DatabaseAdapter.deleteDatabase(getApplicationContext());
|
||||
setResult(APP_LOGOUT);
|
||||
|
@ -411,8 +411,9 @@ public class GlobalSettings {
|
||||
/**
|
||||
* Remove all user content from Shared Preferences
|
||||
*/
|
||||
public void logout() {
|
||||
public void logout(Context c) {
|
||||
settings.edit().clear().apply();
|
||||
ourInstance = null;
|
||||
loggedIn = false;
|
||||
ourInstance = new GlobalSettings(c);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user