Add display of handle when using multiple accounts (#2697)
- Shown on the main toolbar (subtitle) - Shown just above the "replying to" message (even if not replying)
This commit is contained in:
parent
ffe42c992f
commit
c908ebb3f1
4 changed files with 28 additions and 1 deletions
|
@ -834,6 +834,9 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
|||
header.clear()
|
||||
header.profiles = profiles
|
||||
header.setActiveProfile(accountManager.activeAccount!!.id)
|
||||
binding.mainToolbar.subtitle = if (accountManager.accounts.size > 1) {
|
||||
accountManager.activeAccount!!.fullName
|
||||
} else null
|
||||
}
|
||||
|
||||
override fun getActionButton() = binding.composeButton
|
||||
|
|
|
@ -236,6 +236,17 @@ class ComposeActivity :
|
|||
val composeOptions: ComposeOptions? = intent.getParcelableExtra(COMPOSE_OPTIONS_EXTRA)
|
||||
|
||||
viewModel.setup(composeOptions)
|
||||
|
||||
if (accountManager.accounts.size > 1) {
|
||||
binding.composeUsernameView.text = getString(
|
||||
R.string.compose_active_account_description,
|
||||
activeAccount.fullName
|
||||
)
|
||||
binding.composeUsernameView.show()
|
||||
} else {
|
||||
binding.composeUsernameView.hide()
|
||||
}
|
||||
|
||||
setupReplyViews(composeOptions?.replyingStatusAuthor, composeOptions?.replyingStatusContent)
|
||||
val statusContent = composeOptions?.content
|
||||
if (!statusContent.isNullOrEmpty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue