mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Do not use theme in the Preview, it breaks the screenshots building.
This commit is contained in:
committed by
Benoit Marty
parent
fd32ef7781
commit
948d4f64f7
+14
-19
@@ -33,7 +33,6 @@ import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import io.element.android.x.designsystem.ElementXTheme
|
||||
import io.element.android.x.designsystem.components.avatar.Avatar
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarSize
|
||||
@@ -84,29 +83,25 @@ fun MatrixUserHeader(
|
||||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserHeaderPreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserHeaderNoUsernamePreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = null,
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserHeader(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = null,
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
+7
-10
@@ -33,7 +33,6 @@ import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import io.element.android.x.designsystem.ElementXTheme
|
||||
import io.element.android.x.designsystem.components.avatar.Avatar
|
||||
import io.element.android.x.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.x.matrix.core.UserId
|
||||
@@ -88,14 +87,12 @@ fun MatrixUserRow(
|
||||
@Preview
|
||||
@Composable
|
||||
fun MatrixUserRowPreview() {
|
||||
ElementXTheme {
|
||||
MatrixUserRow(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
MatrixUserRow(
|
||||
MatrixUser(
|
||||
id = UserId("@alice:server.org"),
|
||||
username = "Alice",
|
||||
avatarUrl = null,
|
||||
avatarData = AvatarData("Alice")
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user