diff --git a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/SpaceView.kt b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/SpaceView.kt index b6077f4007..0213f94c5b 100644 --- a/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/SpaceView.kt +++ b/features/space/impl/src/main/kotlin/io/element/android/features/space/impl/SpaceView.kt @@ -58,7 +58,7 @@ fun SpaceView( Scaffold( modifier = modifier, topBar = { - SpaceViewTopBar(spaceRoom = null, onBackClick = onBackClick) + SpaceViewTopBar(currentSpace = state.currentSpace, onBackClick = onBackClick) }, content = { padding -> Box( @@ -141,7 +141,7 @@ private fun LoadingMoreIndicator( @OptIn(ExperimentalMaterial3Api::class) @Composable private fun SpaceViewTopBar( - spaceRoom: SpaceRoom?, + currentSpace: SpaceRoom?, onBackClick: () -> Unit, modifier: Modifier = Modifier, ) { @@ -151,10 +151,10 @@ private fun SpaceViewTopBar( BackButton(onClick = onBackClick) }, title = { - if (spaceRoom != null) { + if (currentSpace != null) { SpaceAvatarAndNameRow( - name = spaceRoom.name, - avatarData = spaceRoom.getAvatarData(AvatarSize.TimelineRoom), + name = currentSpace.name, + avatarData = currentSpace.getAvatarData(AvatarSize.TimelineRoom), ) } },