mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
feature (space) : display top bar title
This commit is contained in:
+5
-5
@@ -58,7 +58,7 @@ fun SpaceView(
|
|||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
topBar = {
|
topBar = {
|
||||||
SpaceViewTopBar(spaceRoom = null, onBackClick = onBackClick)
|
SpaceViewTopBar(currentSpace = state.currentSpace, onBackClick = onBackClick)
|
||||||
},
|
},
|
||||||
content = { padding ->
|
content = { padding ->
|
||||||
Box(
|
Box(
|
||||||
@@ -141,7 +141,7 @@ private fun LoadingMoreIndicator(
|
|||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
private fun SpaceViewTopBar(
|
private fun SpaceViewTopBar(
|
||||||
spaceRoom: SpaceRoom?,
|
currentSpace: SpaceRoom?,
|
||||||
onBackClick: () -> Unit,
|
onBackClick: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
@@ -151,10 +151,10 @@ private fun SpaceViewTopBar(
|
|||||||
BackButton(onClick = onBackClick)
|
BackButton(onClick = onBackClick)
|
||||||
},
|
},
|
||||||
title = {
|
title = {
|
||||||
if (spaceRoom != null) {
|
if (currentSpace != null) {
|
||||||
SpaceAvatarAndNameRow(
|
SpaceAvatarAndNameRow(
|
||||||
name = spaceRoom.name,
|
name = currentSpace.name,
|
||||||
avatarData = spaceRoom.getAvatarData(AvatarSize.TimelineRoom),
|
avatarData = currentSpace.getAvatarData(AvatarSize.TimelineRoom),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user