From be6583f9878f4254202742b0dea9737fe06a7491 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 15 Jun 2023 13:48:37 +0530 Subject: chore: update PGP key list previews --- .../java/app/passwordstore/ui/pgp/PGPKeyList.kt | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt index fd717a8b..f157cb12 100644 --- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt +++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyList.kt @@ -1,8 +1,10 @@ package app.passwordstore.ui.pgp import androidx.compose.foundation.Image +import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize @@ -14,6 +16,7 @@ import androidx.compose.foundation.lazy.items import androidx.compose.material3.AlertDialog import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -134,19 +137,25 @@ private inline fun DeleteConfirmationDialog( @Composable private fun KeyListPreview() { APSThemePreview { - KeyList( - identifiers = - listOfNotNull( - GpgIdentifier.fromString("john.doe@example.com"), - GpgIdentifier.fromString("0xB950AE2813841585") - ), - onItemClick = {} - ) + Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) { + KeyList( + identifiers = + listOfNotNull( + GpgIdentifier.fromString("ultramicroscopicsilicovolcanoconiosis@example.com"), + GpgIdentifier.fromString("0xB950AE2813841585"), + ), + onItemClick = {} + ) + } } } @Preview @Composable fun EmptyKeyListPreview() { - APSThemePreview { KeyList(identifiers = emptyList(), onItemClick = {}) } + APSThemePreview { + Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) { + KeyList(identifiers = emptyList(), onItemClick = {}) + } + } } -- cgit v1.2.3