some changes
This commit is contained in:
parent
82e4e40af5
commit
46c678a3e2
|
@ -65,15 +65,15 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
}
|
}
|
||||||
if (social == SOCIAL.MASTODON || social == SOCIAL.PIXELFED || social == SOCIAL.PLEROMA) {
|
if (social == SOCIAL.MASTODON || social == SOCIAL.PIXELFED || social == SOCIAL.PLEROMA) {
|
||||||
account = new API(this.contextReference.get(), instance, null).verifyCredentials();
|
account = new API(this.contextReference.get(), instance, null).verifyCredentials();
|
||||||
InstanceNodeInfo info = new API(this.contextReference.get(), instance, null).displayNodeInfo(this.instance);
|
InstanceNodeInfo info = new API(this.contextReference.get(), instance, token).displayNodeInfo(this.instance);
|
||||||
if (info != null && info.getName() != null && account != null)
|
if (info != null && info.getName() != null && account != null)
|
||||||
account.setSocial(info.getName().toUpperCase());
|
account.setSocial(info.getName().toUpperCase());
|
||||||
} else if (social == SOCIAL.PEERTUBE) {
|
} else if (social == SOCIAL.PEERTUBE) {
|
||||||
account = new PeertubeAPI(this.contextReference.get(), instance, null).verifyCredentials();
|
account = new PeertubeAPI(this.contextReference.get(), instance, token).verifyCredentials();
|
||||||
if (account != null)
|
if (account != null)
|
||||||
account.setSocial("PEERTUBE");
|
account.setSocial("PEERTUBE");
|
||||||
} else {
|
} else {
|
||||||
account = new GNUAPI(this.contextReference.get(), instance, null).verifyCredentials();
|
account = new GNUAPI(this.contextReference.get(), instance, token).verifyCredentials();
|
||||||
}
|
}
|
||||||
if (account == null)
|
if (account == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue