mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-27 09:31:22 +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() {
|
.setPositiveButton(R.string.yes_confirm, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
settings.logout();
|
settings.logout(getApplicationContext());
|
||||||
TwitterEngine.destroyInstance();
|
TwitterEngine.destroyInstance();
|
||||||
DatabaseAdapter.deleteDatabase(getApplicationContext());
|
DatabaseAdapter.deleteDatabase(getApplicationContext());
|
||||||
setResult(APP_LOGOUT);
|
setResult(APP_LOGOUT);
|
||||||
|
@ -411,8 +411,9 @@ public class GlobalSettings {
|
|||||||
/**
|
/**
|
||||||
* Remove all user content from Shared Preferences
|
* Remove all user content from Shared Preferences
|
||||||
*/
|
*/
|
||||||
public void logout() {
|
public void logout(Context c) {
|
||||||
settings.edit().clear().apply();
|
settings.edit().clear().apply();
|
||||||
ourInstance = null;
|
loggedIn = false;
|
||||||
|
ourInstance = new GlobalSettings(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user