fix account switching (#4636)

closes #4631 
closes #4629 

and other weirdness introduced in Tusky 26.1.
I did a lot of testing on 2 physical devices and multiple emulators. It
definitely is better than before, but probably still not perfect.
This commit is contained in:
Konrad Pozniak 2024-09-02 19:49:22 +02:00 committed by GitHub
commit 31e4f08966
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 121 additions and 145 deletions

View file

@ -38,9 +38,7 @@ inline fun <reified T> apiForAccount(
)
.removeHeader(MastodonApi.DOMAIN_HEADER)
.build()
}
if (account != null && request.url.host == account.domain) {
} else if (account != null && request.url.host == account.domain) {
request = request.newBuilder()
.header("Authorization", "Bearer ${account.accessToken}")
.build()