diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 022b6271..8ab2924e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,7 +12,6 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:largeHeap="true" - android:hardwareAccelerated="false" android:theme="@style/Theme.Letro"> Unit)? = null, ) { Box( + contentAlignment = Alignment.CenterStart, modifier = Modifier .fillMaxWidth() + .height(if (contact.alias != null) 64.dp else 56.dp) .applyIf(onContactClick != null) { clickable { onContactClick?.invoke() } } .padding( - vertical = if (contact.alias == null) 16.dp else 10.dp, horizontal = 16.dp, ) .background(MaterialTheme.colorScheme.surface), @@ -48,6 +51,7 @@ fun ContactView( color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.TitleMediumProminent, ) + Spacer(modifier = Modifier.height(2.dp)) } Text( text = contact.contactVeraId, diff --git a/app/src/main/java/tech/relaycorp/letro/contacts/ui/ManageContactScreen.kt b/app/src/main/java/tech/relaycorp/letro/contacts/ui/ManageContactScreen.kt index 215f5ec7..fe9d30bc 100644 --- a/app/src/main/java/tech/relaycorp/letro/contacts/ui/ManageContactScreen.kt +++ b/app/src/main/java/tech/relaycorp/letro/contacts/ui/ManageContactScreen.kt @@ -5,8 +5,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.SnackbarHostState -import androidx.compose.material3.SnackbarResult import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -29,7 +27,6 @@ import tech.relaycorp.letro.ui.common.LetroButtonMaxWidthFilled import tech.relaycorp.letro.ui.common.LetroInfoView import tech.relaycorp.letro.ui.common.LetroOutlinedTextField import tech.relaycorp.letro.ui.theme.HorizontalScreenPadding -import tech.relaycorp.letro.ui.utils.SnackbarStringsProvider import tech.relaycorp.letro.utils.permission.rememberNotificationPermissionStateCompat @OptIn(ExperimentalPermissionsApi::class) @@ -37,9 +34,7 @@ import tech.relaycorp.letro.utils.permission.rememberNotificationPermissionState fun ManageContactScreen( onBackClick: () -> Unit, onEditContactCompleted: (String) -> Unit, - snackbarHostState: SnackbarHostState, - snackbarStringsProvider: SnackbarStringsProvider, - onGoToSettingsClick: () -> Unit, + showGoToSettingsPermissionSnackbar: () -> Unit, viewModel: ManageContactViewModel = hiltViewModel(), ) { val uiState by viewModel.uiState.collectAsState() @@ -64,13 +59,7 @@ fun ManageContactScreen( LaunchedEffect(Unit) { viewModel.showPermissionGoToSettingsSignal.collect { - val result = snackbarHostState.showSnackbar( - message = snackbarStringsProvider.notificationPermissionDenied, - actionLabel = snackbarStringsProvider.goToSettings, - ) - if (result == SnackbarResult.ActionPerformed) { - onGoToSettingsClick() - } + showGoToSettingsPermissionSnackbar() } } @@ -137,13 +126,19 @@ private fun ManageContactView( isError = errorCaption != null, isEnabled = uiState.isVeraIdInputEnabled, ) { + Spacer(modifier = Modifier.height(6.dp)) if (errorCaption != null) { - Spacer(modifier = Modifier.height(6.dp)) Text( text = stringResource(id = errorCaption.message), color = MaterialTheme.colorScheme.error, style = MaterialTheme.typography.bodySmall, ) + } else if (!uiState.isActionButtonEnabled) { + Text( + text = stringResource(id = R.string.pair_request_invalid_id), + color = MaterialTheme.colorScheme.onSurface, + style = MaterialTheme.typography.bodySmall, + ) } } if (uiState.isSentRequestAgainHintVisible) { diff --git a/app/src/main/java/tech/relaycorp/letro/conversation/list/ui/ConversationsListScreen.kt b/app/src/main/java/tech/relaycorp/letro/conversation/list/ui/ConversationsListScreen.kt index 9dcf2aef..fa74fcef 100644 --- a/app/src/main/java/tech/relaycorp/letro/conversation/list/ui/ConversationsListScreen.kt +++ b/app/src/main/java/tech/relaycorp/letro/conversation/list/ui/ConversationsListScreen.kt @@ -131,12 +131,13 @@ private fun Conversation( onConversationClick: () -> Unit, ) { Box( + contentAlignment = Alignment.CenterStart, modifier = Modifier .fillMaxWidth() + .height(64.dp) .clickable { onConversationClick() } .padding( horizontal = 16.dp, - vertical = 10.dp, ), ) { Column { @@ -170,6 +171,7 @@ private fun Conversation( maxLines = 1, ) } + Spacer(modifier = Modifier.height(2.dp)) Row { Text( text = conversation.subject ?: noSubjectText, @@ -187,7 +189,7 @@ private fun Conversation( ) val messageDisplayedText = if (conversation.messages.last().text.isNotEmptyOrBlank()) conversation.messages.last().text else conversation.messages.last().attachments.firstOrNull()?.name ?: "" Text( - text = messageDisplayedText, + text = messageDisplayedText.replace("[\\r\\n]+".toRegex(), " "), style = if (!conversation.isRead) MaterialTheme.typography.BodyMediumProminent else MaterialTheme.typography.bodyMedium, color = if (!conversation.isRead) MaterialTheme.colorScheme.onSurface else MaterialTheme.colorScheme.onSurfaceVariant, maxLines = 1, @@ -212,8 +214,10 @@ private fun ConversationsSectionSelector( verticalAlignment = Alignment.CenterVertically, modifier = Modifier .padding( - horizontal = 16.dp, - vertical = 16.dp, + start = 16.dp, + end = 16.dp, + top = 16.dp, + bottom = 12.dp, ) .clickable { onClick() }, ) { @@ -245,7 +249,8 @@ private fun EmptyConversationsView( ) { Box( contentAlignment = Alignment.Center, - modifier = Modifier.fillMaxSize() + modifier = Modifier + .fillMaxSize() .padding(bottom = 48.dp), ) { Column( diff --git a/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewConversationProcessor.kt b/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewConversationProcessor.kt index 0c06257c..da919838 100644 --- a/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewConversationProcessor.kt +++ b/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewConversationProcessor.kt @@ -3,6 +3,7 @@ package tech.relaycorp.letro.conversation.server.processor import tech.relaycorp.awaladroid.messaging.IncomingMessage import tech.relaycorp.letro.awala.AwalaManager import tech.relaycorp.letro.awala.processor.AwalaMessageProcessor +import tech.relaycorp.letro.contacts.storage.dao.ContactsDao import tech.relaycorp.letro.conversation.attachments.AttachmentsRepository import tech.relaycorp.letro.conversation.server.dto.ConversationAwalaWrapper import tech.relaycorp.letro.conversation.server.dto.NewConversationIncomingMessage @@ -12,6 +13,7 @@ import tech.relaycorp.letro.conversation.storage.dao.MessagesDao import tech.relaycorp.letro.conversation.storage.entity.Conversation import tech.relaycorp.letro.conversation.storage.entity.Message import tech.relaycorp.letro.push.PushManager +import tech.relaycorp.letro.push.PushNewMessageTextFormatter import tech.relaycorp.letro.push.model.PushAction import tech.relaycorp.letro.push.model.PushData import java.time.LocalDateTime @@ -25,7 +27,9 @@ class NewConversationProcessorImpl @Inject constructor( private val newConversationMessageParser: NewConversationMessageParser, private val conversationsDao: ConversationsDao, private val messagesDao: MessagesDao, + private val contactsDao: ContactsDao, private val attachmentsRepository: AttachmentsRepository, + private val messageTextFormatter: PushNewMessageTextFormatter, ) : NewConversationProcessor { override suspend fun process(message: IncomingMessage, awalaManager: AwalaManager) { @@ -55,10 +59,15 @@ class NewConversationProcessorImpl @Inject constructor( attachmentsRepository.saveMessageAttachments(messageId, conversationWrapper.attachments) + val senderAlias = contactsDao.getContact( + ownerVeraId = conversation.ownerVeraId, + contactVeraId = conversation.contactVeraId, + )?.alias + pushManager.showPush( PushData( - title = conversationWrapper.senderVeraId, - text = conversationWrapper.messageText, + title = senderAlias ?: conversationWrapper.senderVeraId, + text = messageTextFormatter.getText(conversation.subject, message.text, conversationWrapper.attachments.map { it.fileName }), action = PushAction.OpenConversation( conversationId = conversationWrapper.conversationId, accountId = conversation.ownerVeraId, diff --git a/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewMessageProcessor.kt b/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewMessageProcessor.kt index 9f03b50c..534b8619 100644 --- a/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewMessageProcessor.kt +++ b/app/src/main/java/tech/relaycorp/letro/conversation/server/processor/NewMessageProcessor.kt @@ -3,6 +3,7 @@ package tech.relaycorp.letro.conversation.server.processor import tech.relaycorp.awaladroid.messaging.IncomingMessage import tech.relaycorp.letro.awala.AwalaManager import tech.relaycorp.letro.awala.processor.AwalaMessageProcessor +import tech.relaycorp.letro.contacts.storage.dao.ContactsDao import tech.relaycorp.letro.conversation.attachments.AttachmentsRepository import tech.relaycorp.letro.conversation.server.dto.NewMessageIncomingMessage import tech.relaycorp.letro.conversation.server.parser.NewMessageMessageParser @@ -11,6 +12,7 @@ import tech.relaycorp.letro.conversation.storage.dao.MessagesDao import tech.relaycorp.letro.conversation.storage.entity.Conversation import tech.relaycorp.letro.conversation.storage.entity.Message import tech.relaycorp.letro.push.PushManager +import tech.relaycorp.letro.push.PushNewMessageTextFormatter import tech.relaycorp.letro.push.model.PushAction import tech.relaycorp.letro.push.model.PushData import java.time.LocalDateTime @@ -25,6 +27,8 @@ class NewMessageProcessorImpl @Inject constructor( private val conversationsDao: ConversationsDao, private val messagesDao: MessagesDao, private val attachmentsRepository: AttachmentsRepository, + private val contactsDao: ContactsDao, + private val messageTextFormatter: PushNewMessageTextFormatter, ) : NewMessageProcessor { @Suppress("NAME_SHADOWING") @@ -58,10 +62,15 @@ class NewMessageProcessorImpl @Inject constructor( ) val messageId = messagesDao.insert(message) attachmentsRepository.saveMessageAttachments(messageId, messageWrapper.attachments) + + val senderAlias = contactsDao.getContact( + ownerVeraId = conversation.ownerVeraId, + contactVeraId = conversation.contactVeraId, + )?.alias pushManager.showPush( PushData( - title = message.senderVeraId, - text = message.text, + title = senderAlias ?: message.senderVeraId, + text = messageTextFormatter.getText(conversation.subject, message.text, messageWrapper.attachments.map { it.fileName }), action = PushAction.OpenConversation( conversationId = messageWrapper.conversationId, accountId = conversation.ownerVeraId, diff --git a/app/src/main/java/tech/relaycorp/letro/conversation/viewing/ui/ConversationScreen.kt b/app/src/main/java/tech/relaycorp/letro/conversation/viewing/ui/ConversationScreen.kt index 57421d36..3775b751 100644 --- a/app/src/main/java/tech/relaycorp/letro/conversation/viewing/ui/ConversationScreen.kt +++ b/app/src/main/java/tech/relaycorp/letro/conversation/viewing/ui/ConversationScreen.kt @@ -1,5 +1,6 @@ package tech.relaycorp.letro.conversation.viewing.ui +import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable @@ -51,6 +52,7 @@ import tech.relaycorp.letro.utils.compose.toDp import tech.relaycorp.letro.utils.ext.applyIf import java.util.UUID +@OptIn(ExperimentalFoundationApi::class) @Composable fun ConversationScreen( conversationsStringsProvider: ConversationsStringsProvider, @@ -86,11 +88,13 @@ fun ConversationScreen( }, ) } - Column { - Surface( - shadowElevation = if (scrollState.canScrollBackward) Elevation2 else 0.dp, - ) { - Column { + LazyColumn( + state = scrollState, + ) { + stickyHeader { + Surface( + shadowElevation = if (scrollState.canScrollBackward) Elevation2 else 0.dp, + ) { ConversationToolbar( isArchived = conversation.isArchived, onReplyClick = onReplyClick, @@ -101,38 +105,36 @@ fun ConversationScreen( }, onDeleteClick = { viewModel.onDeleteConversationClick() }, ) - Text( - text = conversation.subject ?: conversationsStringsProvider.noSubject, - style = MaterialTheme.typography.titleLarge, - color = MaterialTheme.colorScheme.onSurface, - modifier = Modifier - .padding( - horizontal = 16.dp, - vertical = 10.dp, - ), - ) } } - LazyColumn( - state = scrollState, - ) { - items(conversation.messages.size) { position -> - val message = conversation.messages[position] - val isLastMessage = position == conversation.messages.size - 1 - Message( - message = message, - isCollapsable = conversation.messages.size > 1, - isLastMessage = isLastMessage, - onAttachmentClick = { onAttachmentClick(it.fileId) }, + item { + Text( + text = conversation.subject ?: conversationsStringsProvider.noSubject, + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.onSurface, + modifier = Modifier + .padding( + horizontal = 16.dp, + vertical = 10.dp, + ), + ) + } + items(conversation.messages.size) { position -> + val message = conversation.messages[position] + val isLastMessage = position == conversation.messages.size - 1 + Message( + message = message, + isCollapsable = conversation.messages.size > 1, + isLastMessage = isLastMessage, + onAttachmentClick = { onAttachmentClick(it.fileId) }, + ) + if (!isLastMessage) { + Divider( + modifier = Modifier + .background(MaterialTheme.colorScheme.outlineVariant) + .fillMaxWidth() + .height(1.dp), ) - if (!isLastMessage) { - Divider( - modifier = Modifier - .background(MaterialTheme.colorScheme.outlineVariant) - .fillMaxWidth() - .height(1.dp), - ) - } } } } @@ -153,6 +155,9 @@ private fun Message( Column( modifier = Modifier .fillMaxWidth() + .applyIf(isCollapsed) { + height(CollapsedMessageHeight) + } .applyIf(isCollapsable && isCollapsed) { clickable { isCollapsed = !isCollapsed } } @@ -184,6 +189,7 @@ private fun Message( ) } if (!isCollapsed) { + Spacer(modifier = Modifier.height(2.dp)) Text( text = stringResource(id = if (isDetailsCollapsed) R.string.show_more else R.string.show_less), style = MaterialTheme.typography.bodySmall, @@ -215,7 +221,7 @@ private fun Message( maxLines = if (isCollapsed) 1 else Int.MAX_VALUE, modifier = Modifier .padding( - vertical = if (isCollapsed) 0.dp else 10.dp, + vertical = if (isCollapsed) 2.dp else 10.dp, horizontal = 16.dp, ), ) @@ -475,3 +481,5 @@ private fun MessageInfo_Preview() { ) } } + +private val CollapsedMessageHeight = 64.dp diff --git a/app/src/main/java/tech/relaycorp/letro/notification/ui/NotificationsScreen.kt b/app/src/main/java/tech/relaycorp/letro/notification/ui/NotificationsScreen.kt index c67d88a9..e0ae8778 100644 --- a/app/src/main/java/tech/relaycorp/letro/notification/ui/NotificationsScreen.kt +++ b/app/src/main/java/tech/relaycorp/letro/notification/ui/NotificationsScreen.kt @@ -3,6 +3,7 @@ package tech.relaycorp.letro.notification.ui import androidx.annotation.StringRes import androidx.compose.foundation.background import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -19,6 +20,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -106,34 +108,38 @@ private fun Notification( isRead: Boolean, onClick: () -> Unit, ) { - Row( + Box( + contentAlignment = Alignment.CenterStart, modifier = Modifier .fillMaxWidth() + .height(64.dp) .clickable { onClick() } .background(if (isRead) MaterialTheme.colorScheme.surface else MaterialTheme.colorScheme.surfaceVariant) .padding( - vertical = 12.dp, horizontal = 16.dp, ), ) { - Column { + Row { + Column { + Text( + text = upperText, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurface, + ) + Spacer(modifier = Modifier.height(2.dp)) + Text( + text = bottomText, + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.onSurface, + ) + } + Spacer(modifier = Modifier.weight(1f)) Text( - text = upperText, - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurface, - ) - Text( - text = bottomText, - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.onSurface, + text = date, + style = MaterialTheme.typography.bodySmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, ) } - Spacer(modifier = Modifier.weight(1f)) - Text( - text = date, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - ) } } diff --git a/app/src/main/java/tech/relaycorp/letro/push/PushNewMessageTextFormatter.kt b/app/src/main/java/tech/relaycorp/letro/push/PushNewMessageTextFormatter.kt new file mode 100644 index 00000000..4312b667 --- /dev/null +++ b/app/src/main/java/tech/relaycorp/letro/push/PushNewMessageTextFormatter.kt @@ -0,0 +1,25 @@ +package tech.relaycorp.letro.push + +import tech.relaycorp.letro.utils.ext.isNotEmptyOrBlank +import javax.inject.Inject + +interface PushNewMessageTextFormatter { + fun getText( + subject: String?, + messageText: String, + attachments: List, + ): String +} + +class PushNewMessageTextFormatterImpl @Inject constructor() : PushNewMessageTextFormatter { + + override fun getText( + subject: String?, + messageText: String, + attachments: List, + ): String { + return """ + ${if (subject != null) "$subject - " else ""}${if (messageText.isNotEmptyOrBlank()) messageText else ""}${if (attachments.isNotEmpty()) " ${attachments.first()}" else ""} + """.trimIndent() + } +} diff --git a/app/src/main/java/tech/relaycorp/letro/push/di/PushesModule.kt b/app/src/main/java/tech/relaycorp/letro/push/di/PushesModule.kt index 3eb1f7d4..aeea49b0 100644 --- a/app/src/main/java/tech/relaycorp/letro/push/di/PushesModule.kt +++ b/app/src/main/java/tech/relaycorp/letro/push/di/PushesModule.kt @@ -8,6 +8,8 @@ import dagger.hilt.components.SingletonComponent import tech.relaycorp.letro.R import tech.relaycorp.letro.push.PushManager import tech.relaycorp.letro.push.PushManagerImpl +import tech.relaycorp.letro.push.PushNewMessageTextFormatter +import tech.relaycorp.letro.push.PushNewMessageTextFormatterImpl import tech.relaycorp.letro.push.PushPermissionManager import tech.relaycorp.letro.push.PushPermissionManagerImpl import tech.relaycorp.letro.push.model.PushChannel @@ -41,5 +43,10 @@ object PushesModule { fun bindNotificationPermissionManager( impl: PushPermissionManagerImpl, ): PushPermissionManager + + @Binds + fun bindPushNewMessageTextFormatter( + impl: PushNewMessageTextFormatterImpl, + ): PushNewMessageTextFormatter } } diff --git a/app/src/main/java/tech/relaycorp/letro/ui/common/LetroButton.kt b/app/src/main/java/tech/relaycorp/letro/ui/common/LetroButton.kt index f085978d..7f4f2833 100644 --- a/app/src/main/java/tech/relaycorp/letro/ui/common/LetroButton.kt +++ b/app/src/main/java/tech/relaycorp/letro/ui/common/LetroButton.kt @@ -41,7 +41,7 @@ fun LetroButton( }, contentColor = when (buttonType) { ButtonType.Filled -> MaterialTheme.colorScheme.onPrimary - ButtonType.Outlined -> MaterialTheme.colorScheme.primary + ButtonType.Outlined -> MaterialTheme.colorScheme.onSurface }, disabledContainerColor = LetroColor.disabledButtonBackgroundColor(), disabledContentColor = LetroColor.disabledButtonTextColor(), @@ -57,10 +57,11 @@ fun LetroButton( contentPadding = contentPadding, onClick = onClick, ) { + val contentColor = if (enabled) MaterialTheme.colorScheme.onPrimary else LetroColor.disabledButtonTextColor() if (leadingIconResId != null) { Icon( painter = painterResource(id = leadingIconResId), - tint = if (enabled) MaterialTheme.colorScheme.onPrimary else LetroColor.disabledButtonTextColor(), + tint = contentColor, contentDescription = null, ) Spacer( @@ -70,6 +71,7 @@ fun LetroButton( Text( text = text, style = MaterialTheme.typography.LabelLargeProminent, + color = contentColor, ) } } diff --git a/app/src/main/java/tech/relaycorp/letro/ui/navigation/LetroNavHost.kt b/app/src/main/java/tech/relaycorp/letro/ui/navigation/LetroNavHost.kt index 8c747845..99cb91ee 100644 --- a/app/src/main/java/tech/relaycorp/letro/ui/navigation/LetroNavHost.kt +++ b/app/src/main/java/tech/relaycorp/letro/ui/navigation/LetroNavHost.kt @@ -13,8 +13,10 @@ import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Snackbar +import androidx.compose.material3.SnackbarDuration import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState +import androidx.compose.material3.SnackbarResult import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState @@ -278,9 +280,18 @@ fun LetroNavHost( else -> throw IllegalStateException("Unknown screen type: $type") } }, - snackbarHostState = snackbarHostState, - snackbarStringsProvider = stringsProvider.snackbar, - onGoToSettingsClick = onGoToNotificationsSettingsClick, + showGoToSettingsPermissionSnackbar = { + scope.launch { + val result = snackbarHostState.showSnackbar( + message = stringsProvider.snackbar.notificationPermissionDenied, + actionLabel = stringsProvider.snackbar.goToSettings, + duration = SnackbarDuration.Long, + ) + if (result == SnackbarResult.ActionPerformed) { + onGoToNotificationsSettingsClick() + } + } + }, ) } composable(Route.Home.name) { diff --git a/app/src/main/java/tech/relaycorp/letro/ui/theme/Theme.kt b/app/src/main/java/tech/relaycorp/letro/ui/theme/Theme.kt index c2389e59..e1f97ea2 100644 --- a/app/src/main/java/tech/relaycorp/letro/ui/theme/Theme.kt +++ b/app/src/main/java/tech/relaycorp/letro/ui/theme/Theme.kt @@ -23,7 +23,7 @@ private val DarkColorScheme = lightColorScheme( errorContainer = Error4, surface = NeutralVariant1, onSurface = NeutralVariant8, - surfaceVariant = NeutralVariant2, + surfaceVariant = NeutralVariant3, onSurfaceVariant = NeutralVariant6, primaryContainer = NeutralVariant4, onPrimaryContainer = NeutralVariant5, diff --git a/app/src/main/java/tech/relaycorp/letro/ui/theme/Type.kt b/app/src/main/java/tech/relaycorp/letro/ui/theme/Type.kt index 7ac4b490..e7a91558 100644 --- a/app/src/main/java/tech/relaycorp/letro/ui/theme/Type.kt +++ b/app/src/main/java/tech/relaycorp/letro/ui/theme/Type.kt @@ -112,7 +112,7 @@ val Typography.LabelLargeProminent: TextStyle fontWeight = FontWeight.SemiBold, fontSize = 15.sp, lineHeight = 20.sp, - letterSpacing = (-0.25).sp, + letterSpacing = (-0.1).sp, ) val Typography.LabelMediumProminent: TextStyle diff --git a/app/src/main/res/drawable-night/letro_notification_icon.xml b/app/src/main/res/drawable-night/letro_notification_icon.xml index b095b640..7dc5a06f 100644 --- a/app/src/main/res/drawable-night/letro_notification_icon.xml +++ b/app/src/main/res/drawable-night/letro_notification_icon.xml @@ -5,18 +5,22 @@ android:viewportHeight="24"> - - - - + android:pathData="M0,0h24v24h-24z"/> + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index 18fd82da..9ed5afa1 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -9,53 +9,53 @@ android:translateY="9.1866665"> + android:pathData="M0,0h48v48h-48z"/> diff --git a/app/src/main/res/drawable/letro_logo.xml b/app/src/main/res/drawable/letro_logo.xml index 50e3b16d..51a79f69 100644 --- a/app/src/main/res/drawable/letro_logo.xml +++ b/app/src/main/res/drawable/letro_logo.xml @@ -1,71 +1,67 @@ - - - - - - - - - - - - - - - - - - + android:width="148dp" + android:height="40dp" + android:viewportWidth="148" + android:viewportHeight="40"> + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/letro_notification_icon.xml b/app/src/main/res/drawable/letro_notification_icon.xml index 8c508917..254804bf 100644 --- a/app/src/main/res/drawable/letro_notification_icon.xml +++ b/app/src/main/res/drawable/letro_notification_icon.xml @@ -5,18 +5,22 @@ android:viewportHeight="24"> - - - - + android:pathData="M0,0h24v24h-24z"/> + + + + + + + diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp index 20b80739..53681acf 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp index 7c59a9b2..9e91a1d1 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp index 764f1fbc..dff44c0d 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp index 9db75bbd..5ea9f57e 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp index d056e659..b8c4b0d7 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp index d84052d2..82d4ca74 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp index 1f7f7604..b61b6b79 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp index f89c3853..ddd928bf 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp index 9d99999e..55877551 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp index d38b285f..15ebf1ad 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ