mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-21 09:01:56 -07:00
Bug fix: delete offline account causes error
This commit is contained in:
parent
db0f1d39db
commit
1954f9633e
2 changed files with 5 additions and 1 deletions
|
|
@ -783,7 +783,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface p1, int p2) {
|
public void onClick(DialogInterface p1, int p2) {
|
||||||
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
|
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
|
||||||
accountListLayout.removeViewsInLayout(0,1);
|
accountListLayout.removeViewsInLayout(0, 1);
|
||||||
//Resize the window
|
//Resize the window
|
||||||
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int) Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*55)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int) Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*55)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ public class InvalidateTokenTask extends AsyncTask<String, Void, Throwable> {
|
||||||
public Throwable doInBackground(String... args) {
|
public Throwable doInBackground(String... args) {
|
||||||
path = args[0];
|
path = args[0];
|
||||||
try {
|
try {
|
||||||
|
if (profilePath.accessToken.equals("0")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
this.profilePath = MinecraftAccount.load(args[0]);
|
this.profilePath = MinecraftAccount.load(args[0]);
|
||||||
this.authenticator.invalidate(profilePath.accessToken,
|
this.authenticator.invalidate(profilePath.accessToken,
|
||||||
UUID.fromString(profilePath.isMicrosoft ? profilePath.profileId : profilePath.clientToken /* should be? */));
|
UUID.fromString(profilePath.isMicrosoft ? profilePath.profileId : profilePath.clientToken /* should be? */));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue