Add preview with an image.
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
|
||||
package io.element.android.features.preferences.impl.user.editprofile
|
||||
|
||||
import android.net.Uri
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||
import androidx.core.net.toUri
|
||||
import io.element.android.libraries.architecture.AsyncAction
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.permissions.api.aPermissionsState
|
||||
@@ -17,14 +19,17 @@ open class EditUserProfileStateProvider : PreviewParameterProvider<EditUserProfi
|
||||
override val values: Sequence<EditUserProfileState>
|
||||
get() = sequenceOf(
|
||||
aEditUserProfileState(),
|
||||
aEditUserProfileState(userAvatarUrl = "example://uri".toUri()),
|
||||
// Add other states here
|
||||
)
|
||||
}
|
||||
|
||||
fun aEditUserProfileState() = EditUserProfileState(
|
||||
fun aEditUserProfileState(
|
||||
userAvatarUrl: Uri? = null,
|
||||
) = EditUserProfileState(
|
||||
userId = UserId("@john.doe:matrix.org"),
|
||||
displayName = "John Doe",
|
||||
userAvatarUrl = null,
|
||||
userAvatarUrl = userAvatarUrl,
|
||||
avatarActions = persistentListOf(),
|
||||
saveAction = AsyncAction.Uninitialized,
|
||||
saveButtonEnabled = true,
|
||||
|
||||
Reference in New Issue
Block a user