feat: make pfp sticky in sidebar for ios consistency

Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
Infi 2024-11-10 01:22:06 +01:00
parent cbf5e06898
commit 9ea8e0277d
1 changed files with 3 additions and 2 deletions

View File

@ -98,7 +98,7 @@ import chat.revolt.screens.chat.ChatRouterDestination
import chat.revolt.sheets.ChannelContextSheet
import kotlinx.coroutines.launch
@OptIn(ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class)
@Composable
fun ChannelSideDrawer(
currentServer: String?,
@ -200,7 +200,7 @@ fun ChannelSideDrawer(
bottom = WindowInsets.navigationBars.asPaddingValues().calculateBottomPadding()
)
) {
item(key = "self") {
stickyHeader(key = "self") {
UserAvatar(
username = RevoltAPI.userCache[RevoltAPI.selfId]?.let {
User.resolveDefaultName(
@ -221,6 +221,7 @@ fun ChannelSideDrawer(
},
onLongClick = onLongPressAvatar,
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
.padding(8.dp)
.size(48.dp)
)