Skip to content

Commit

Permalink
fix: Whole conversation TopBar clickable (WPB-4833) (#2565)
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow authored Jan 3, 2024
1 parent cd5d92d commit 5533ae4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SmallTopAppBar
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand All @@ -47,8 +48,8 @@ import com.wire.android.R
import com.wire.android.model.UserAvatarData
import com.wire.android.ui.calling.controlbuttons.JoinButton
import com.wire.android.ui.calling.controlbuttons.StartCallButton
import com.wire.android.ui.common.UserProfileAvatar
import com.wire.android.ui.common.ConversationVerificationIcons
import com.wire.android.ui.common.UserProfileAvatar
import com.wire.android.ui.common.button.WireSecondaryIconButton
import com.wire.android.ui.common.colorsScheme
import com.wire.android.ui.common.conversationColor
Expand Down Expand Up @@ -112,11 +113,12 @@ private fun ConversationScreenTopAppBarContent(
isInteractionEnabled: Boolean,
isSearchEnabled: Boolean,
) {
SmallTopAppBar(
TopAppBar(
title = {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
// TopAppBar adds TopAppBarHorizontalPadding = 4.dp to each element, so we need to offset it to retain the desired
// spacing between navigation icon button and avatar according to the designs
.offset(x = -dimensions().spacing4x)
Expand Down

0 comments on commit 5533ae4

Please sign in to comment.