More instance info fixes

This commit is contained in:
Grishka 2024-11-19 22:03:18 +03:00
parent ea31da7f61
commit 43e15dc15e
3 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@ android {
applicationId "org.joinmastodon.android" applicationId "org.joinmastodon.android"
minSdk 23 minSdk 23
targetSdk 34 targetSdk 34
versionCode 130 versionCode 131
versionName "2.9.2" versionName "2.9.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -456,6 +456,7 @@ public class AccountSessionManager{
InstanceV1 fake=new InstanceV1(); InstanceV1 fake=new InstanceV1();
fake.uri=fake.title=domain; fake.uri=fake.title=domain;
fake.description=fake.version=fake.email=""; fake.description=fake.version=fake.email="";
updateInstanceInfo(domain);
return fake; return fake;
} }

View File

@ -175,8 +175,8 @@ public class AccountActivationFragment extends ToolbarFragment{
currentRequest=null; currentRequest=null;
AccountSessionManager mgr=AccountSessionManager.getInstance(); AccountSessionManager mgr=AccountSessionManager.getInstance();
AccountSession session=mgr.getAccount(accountID); AccountSession session=mgr.getAccount(accountID);
mgr.removeAccount(accountID);
mgr.addAccount(mgr.getInstanceInfo(session.domain), session.token, result, session.app, null); mgr.addAccount(mgr.getInstanceInfo(session.domain), session.token, result, session.app, null);
mgr.removeAccount(accountID);
String newID=mgr.getLastActiveAccountID(); String newID=mgr.getLastActiveAccountID();
accountID=newID; accountID=newID;
if((session.self.avatar!=null || session.self.displayName!=null) && !getArguments().getBoolean("debug")){ if((session.self.avatar!=null || session.self.displayName!=null) && !getArguments().getBoolean("debug")){