fix: Show correct account name in "Open as ..." menu (#1139)
This commit is contained in:
parent
e9b66b69e4
commit
d03cf09708
|
@ -287,15 +287,7 @@ abstract class BaseActivity : AppCompatActivity(), MenuProvider {
|
||||||
val accounts = accountManager.accountsOrderedByActive
|
val accounts = accountManager.accountsOrderedByActive
|
||||||
return when (accounts.size) {
|
return when (accounts.size) {
|
||||||
0, 1 -> null
|
0, 1 -> null
|
||||||
2 -> {
|
2 -> getString(R.string.action_open_as, accounts.last().fullName)
|
||||||
for (account in accounts) {
|
|
||||||
if (account !== accountManager.activeAccount) {
|
|
||||||
return getString(R.string.action_open_as, account.fullName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
null
|
|
||||||
}
|
|
||||||
|
|
||||||
else -> getString(R.string.action_open_as, "…")
|
else -> getString(R.string.action_open_as, "…")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue