design(home): rename RomListTopBar to HomeTopBar
This commit is contained in:
parent
0b9a4a6302
commit
296b85eb2f
3 changed files with 13 additions and 13 deletions
|
|
@ -41,7 +41,7 @@ import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
import io.element.android.features.home.impl.components.RoomListContentView
|
import io.element.android.features.home.impl.components.RoomListContentView
|
||||||
import io.element.android.features.home.impl.components.RoomListMenuAction
|
import io.element.android.features.home.impl.components.RoomListMenuAction
|
||||||
import io.element.android.features.home.impl.components.RoomListTopBar
|
import io.element.android.features.home.impl.components.HomeTopBar
|
||||||
import io.element.android.features.home.impl.model.RoomListRoomSummary
|
import io.element.android.features.home.impl.model.RoomListRoomSummary
|
||||||
import io.element.android.features.home.impl.roomlist.RoomListContextMenu
|
import io.element.android.features.home.impl.roomlist.RoomListContextMenu
|
||||||
import io.element.android.features.home.impl.roomlist.RoomListDeclineInviteMenu
|
import io.element.android.features.home.impl.roomlist.RoomListDeclineInviteMenu
|
||||||
|
|
@ -158,7 +158,7 @@ private fun HomeScaffold(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
modifier = modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
modifier = modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
||||||
topBar = {
|
topBar = {
|
||||||
RoomListTopBar(
|
HomeTopBar(
|
||||||
title = stringResource(state.currentHomeNavigationBarItem.labelRes),
|
title = stringResource(state.currentHomeNavigationBarItem.labelRes),
|
||||||
currentUserAndNeighbors = state.currentUserAndNeighbors,
|
currentUserAndNeighbors = state.currentUserAndNeighbors,
|
||||||
showAvatarIndicator = state.showAvatarIndicator,
|
showAvatarIndicator = state.showAvatarIndicator,
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun RoomListTopBar(
|
fun HomeTopBar(
|
||||||
title: String,
|
title: String,
|
||||||
currentUserAndNeighbors: ImmutableList<MatrixUser>,
|
currentUserAndNeighbors: ImmutableList<MatrixUser>,
|
||||||
showAvatarIndicator: Boolean,
|
showAvatarIndicator: Boolean,
|
||||||
|
|
@ -92,7 +92,7 @@ fun RoomListTopBar(
|
||||||
canReportBug: Boolean,
|
canReportBug: Boolean,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
DefaultRoomListTopBar(
|
DefaultHomeTopBar(
|
||||||
title = title,
|
title = title,
|
||||||
currentUserAndNeighbors = currentUserAndNeighbors,
|
currentUserAndNeighbors = currentUserAndNeighbors,
|
||||||
showAvatarIndicator = showAvatarIndicator,
|
showAvatarIndicator = showAvatarIndicator,
|
||||||
|
|
@ -112,7 +112,7 @@ fun RoomListTopBar(
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
private fun DefaultRoomListTopBar(
|
private fun DefaultHomeTopBar(
|
||||||
title: String,
|
title: String,
|
||||||
currentUserAndNeighbors: ImmutableList<MatrixUser>,
|
currentUserAndNeighbors: ImmutableList<MatrixUser>,
|
||||||
showAvatarIndicator: Boolean,
|
showAvatarIndicator: Boolean,
|
||||||
|
|
@ -329,8 +329,8 @@ private fun AccountIcon(
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@PreviewsDayNight
|
@PreviewsDayNight
|
||||||
@Composable
|
@Composable
|
||||||
internal fun DefaultRoomListTopBarPreview() = ElementPreview {
|
internal fun DefaultHomeTopBarPreview() = ElementPreview {
|
||||||
DefaultRoomListTopBar(
|
DefaultHomeTopBar(
|
||||||
title = stringResource(R.string.screen_roomlist_main_space_title),
|
title = stringResource(R.string.screen_roomlist_main_space_title),
|
||||||
currentUserAndNeighbors = persistentListOf(MatrixUser(UserId("@id:domain"), "Alice")),
|
currentUserAndNeighbors = persistentListOf(MatrixUser(UserId("@id:domain"), "Alice")),
|
||||||
showAvatarIndicator = false,
|
showAvatarIndicator = false,
|
||||||
|
|
@ -350,8 +350,8 @@ internal fun DefaultRoomListTopBarPreview() = ElementPreview {
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@PreviewsDayNight
|
@PreviewsDayNight
|
||||||
@Composable
|
@Composable
|
||||||
internal fun DefaultRoomListTopBarWithIndicatorPreview() = ElementPreview {
|
internal fun DefaultHomeTopBarWithIndicatorPreview() = ElementPreview {
|
||||||
DefaultRoomListTopBar(
|
DefaultHomeTopBar(
|
||||||
title = stringResource(R.string.screen_roomlist_main_space_title),
|
title = stringResource(R.string.screen_roomlist_main_space_title),
|
||||||
currentUserAndNeighbors = persistentListOf(MatrixUser(UserId("@id:domain"), "Alice")),
|
currentUserAndNeighbors = persistentListOf(MatrixUser(UserId("@id:domain"), "Alice")),
|
||||||
showAvatarIndicator = true,
|
showAvatarIndicator = true,
|
||||||
|
|
@ -371,8 +371,8 @@ internal fun DefaultRoomListTopBarWithIndicatorPreview() = ElementPreview {
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@PreviewsDayNight
|
@PreviewsDayNight
|
||||||
@Composable
|
@Composable
|
||||||
internal fun DefaultRoomListTopBarMultiAccountPreview() = ElementPreview {
|
internal fun DefaultHomeTopBarMultiAccountPreview() = ElementPreview {
|
||||||
DefaultRoomListTopBar(
|
DefaultHomeTopBar(
|
||||||
title = stringResource(R.string.screen_roomlist_main_space_title),
|
title = stringResource(R.string.screen_roomlist_main_space_title),
|
||||||
currentUserAndNeighbors = aMatrixUserList().take(3).toImmutableList(),
|
currentUserAndNeighbors = aMatrixUserList().take(3).toImmutableList(),
|
||||||
showAvatarIndicator = false,
|
showAvatarIndicator = false,
|
||||||
|
|
@ -81,8 +81,8 @@ class KonsistPreviewTest {
|
||||||
"BackgroundVerticalGradientDisabledPreview",
|
"BackgroundVerticalGradientDisabledPreview",
|
||||||
"BackgroundVerticalGradientPreview",
|
"BackgroundVerticalGradientPreview",
|
||||||
"ColorAliasesPreview",
|
"ColorAliasesPreview",
|
||||||
"DefaultRoomListTopBarMultiAccountPreview",
|
"DefaultHomeTopBarMultiAccountPreview",
|
||||||
"DefaultRoomListTopBarWithIndicatorPreview",
|
"DefaultHomeTopBarWithIndicatorPreview",
|
||||||
"FocusedEventPreview",
|
"FocusedEventPreview",
|
||||||
"GradientFloatingActionButtonCircleShapePreview",
|
"GradientFloatingActionButtonCircleShapePreview",
|
||||||
"HeaderFooterPageScrollablePreview",
|
"HeaderFooterPageScrollablePreview",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue