mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
design(home): rename RomListTopBar to HomeTopBar
This commit is contained in:
+2
-2
@@ -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,
|
||||||
|
|||||||
+9
-9
@@ -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,
|
||||||
+2
-2
@@ -81,8 +81,8 @@ class KonsistPreviewTest {
|
|||||||
"BackgroundVerticalGradientDisabledPreview",
|
"BackgroundVerticalGradientDisabledPreview",
|
||||||
"BackgroundVerticalGradientPreview",
|
"BackgroundVerticalGradientPreview",
|
||||||
"ColorAliasesPreview",
|
"ColorAliasesPreview",
|
||||||
"DefaultRoomListTopBarMultiAccountPreview",
|
"DefaultHomeTopBarMultiAccountPreview",
|
||||||
"DefaultRoomListTopBarWithIndicatorPreview",
|
"DefaultHomeTopBarWithIndicatorPreview",
|
||||||
"FocusedEventPreview",
|
"FocusedEventPreview",
|
||||||
"GradientFloatingActionButtonCircleShapePreview",
|
"GradientFloatingActionButtonCircleShapePreview",
|
||||||
"HeaderFooterPageScrollablePreview",
|
"HeaderFooterPageScrollablePreview",
|
||||||
|
|||||||
Reference in New Issue
Block a user