@ -436,10 +436,14 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
private fun setUpToolBar ( ) {
private fun setUpToolBar ( ) {
setSupportActionBar ( binding ?. toolbar )
setSupportActionBar ( binding ?. toolbar )
val actionBar = supportActionBar ?: return
val actionBar = supportActionBar ?: return
val recipient = viewModel . recipient ?: return
actionBar . title = " "
actionBar . title = " "
actionBar . setDisplayHomeAsUpEnabled ( true )
actionBar . setDisplayHomeAsUpEnabled ( true )
actionBar . setHomeButtonEnabled ( true )
actionBar . setHomeButtonEnabled ( true )
binding !! . toolbarContent . conversationTitleView . text = viewModel . recipient ?. toShortString ( )
binding !! . toolbarContent . conversationTitleView . text = when {
recipient . isLocalNumber -> getString ( R . string . note _to _self )
else -> recipient . toShortString ( )
}
@DimenRes val sizeID : Int = if ( viewModel . recipient ?. isClosedGroupRecipient == true ) {
@DimenRes val sizeID : Int = if ( viewModel . recipient ?. isClosedGroupRecipient == true ) {
R . dimen . medium _profile _picture _size
R . dimen . medium _profile _picture _size
} else {
} else {
@ -629,18 +633,19 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
// region Animation & Updating
// region Animation & Updating
override fun onModified ( recipient : Recipient ) {
override fun onModified ( recipient : Recipient ) {
runOnUiThread {
runOnUiThread {
val recipient = viewModel . recipient
val th readR ecipient = viewModel . recipient ?: return @runOnUiThread
if ( recipient != null && r ecipient. isContactRecipient ) {
if ( threadR ecipient. isContactRecipient ) {
binding ?. blockedBanner ?. isVisible = recipient. isBlocked
binding ?. blockedBanner ?. isVisible = th readR ecipient. isBlocked
}
}
setUpMessageRequestsBar ( )
setUpMessageRequestsBar ( )
invalidateOptionsMenu ( )
invalidateOptionsMenu ( )
updateSubtitle ( )
updateSubtitle ( )
showOrHideInputIfNeeded ( )
showOrHideInputIfNeeded ( )
if ( recipient != null ) {
binding ?. toolbarContent ?. profilePictureView ?. root ?. update ( threadRecipient )
binding ?. toolbarContent ?. profilePictureView ?. root ?. update ( recipient )
binding !! . toolbarContent . conversationTitleView . text = when {
threadRecipient . isLocalNumber -> getString ( R . string . note _to _self )
else -> threadRecipient . toShortString ( )
}
}
binding ?. toolbarContent ?. conversationTitleView ?. text = recipient ?. toShortString ( )
}
}
}
}