Improve click behavior on room timeline title. #3063
This commit is contained in:
parent
d0eecd01b3
commit
ea62ed7c5a
2 changed files with 8 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.statusBars
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
|
@ -43,6 +44,7 @@ import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberUpdatedState
|
import androidx.compose.runtime.rememberUpdatedState
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
import androidx.compose.ui.graphics.RectangleShape
|
import androidx.compose.ui.graphics.RectangleShape
|
||||||
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
|
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
|
||||||
|
|
@ -454,7 +456,10 @@ private fun MessagesViewTopBar(
|
||||||
BackButton(onClick = onBackClick)
|
BackButton(onClick = onBackClick)
|
||||||
},
|
},
|
||||||
title = {
|
title = {
|
||||||
val titleModifier = Modifier.clickable { onRoomDetailsClick() }
|
val roundedCornerShape = RoundedCornerShape(8.dp)
|
||||||
|
val titleModifier = Modifier
|
||||||
|
.clip(roundedCornerShape)
|
||||||
|
.clickable { onRoomDetailsClick() }
|
||||||
if (roomName != null && roomAvatar != null) {
|
if (roomName != null && roomAvatar != null) {
|
||||||
RoomAvatarAndNameRow(
|
RoomAvatarAndNameRow(
|
||||||
roomName = roomName,
|
roomName = roomName,
|
||||||
|
|
@ -514,8 +519,8 @@ private fun RoomAvatarAndNameRow(
|
||||||
avatarData = roomAvatar,
|
avatarData = roomAvatar,
|
||||||
heroes = heroes,
|
heroes = heroes,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
|
||||||
Text(
|
Text(
|
||||||
|
modifier = Modifier.padding(horizontal = 8.dp),
|
||||||
text = roomName,
|
text = roomName,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ fun IconTitlePlaceholdersRowMolecule(
|
||||||
PlaceholderAtom(width = 20.dp, height = 7.dp)
|
PlaceholderAtom(width = 20.dp, height = 7.dp)
|
||||||
Spacer(modifier = Modifier.width(7.dp))
|
Spacer(modifier = Modifier.width(7.dp))
|
||||||
PlaceholderAtom(width = 45.dp, height = 7.dp)
|
PlaceholderAtom(width = 45.dp, height = 7.dp)
|
||||||
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue