mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Improve click behavior on room timeline title. #3063
This commit is contained in:
committed by
Benoit Marty
parent
c7dd2d5b6e
commit
6a1304a252
+7
-2
@@ -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,
|
||||||
|
|||||||
+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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user