diff --git a/app/src/main/kotlin/com/wire/android/ui/common/StatusBox.kt b/app/src/main/kotlin/com/wire/android/ui/common/StatusBox.kt index b23d03cc498..19760becc81 100644 --- a/app/src/main/kotlin/com/wire/android/ui/common/StatusBox.kt +++ b/app/src/main/kotlin/com/wire/android/ui/common/StatusBox.kt @@ -48,8 +48,8 @@ import com.wire.android.util.ui.PreviewMultipleThemes fun StatusBox( statusText: String, modifier: Modifier = Modifier, - textColor: Color = MaterialTheme.wireColorScheme.labelText, - badgeColor: Color = MaterialTheme.wireColorScheme.surface, + textColor: Color = MaterialTheme.wireColorScheme.secondaryText, + badgeColor: Color = MaterialTheme.wireColorScheme.surfaceVariant, withBorder: Boolean = true, ) { Box( @@ -61,7 +61,7 @@ fun StatusBox( BorderStroke( width = 1.dp, color = if (withBorder) { - MaterialTheme.wireColorScheme.divider + MaterialTheme.wireColorScheme.outline } else { badgeColor } diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/QuotedMessage.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/QuotedMessage.kt index 3e8de6eb857..1f3914f9f6f 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/QuotedMessage.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/messages/QuotedMessage.kt @@ -192,7 +192,7 @@ private fun QuotedMessageContent( ) .border( width = 1.dp, - color = MaterialTheme.wireColorScheme.divider, + color = MaterialTheme.wireColorScheme.outline, shape = quoteOutlineShape ) .padding(dimensions().spacing4x) @@ -254,7 +254,7 @@ private fun QuotedMessageTopRow( ) } senderName?.let { - Text(text = senderName, style = typography().label02, color = colorsScheme().secondaryText) + Text(text = senderName, style = typography().label02, color = colorsScheme().onSurfaceVariant) } } } @@ -381,7 +381,7 @@ private fun QuotedImage( ) .border( width = 1.dp, - color = MaterialTheme.wireColorScheme.divider, + color = MaterialTheme.wireColorScheme.outline, shape = quoteOutlineShape ) .padding(dimensions().spacing4x) @@ -434,7 +434,7 @@ private fun AutosizeContainer( }.clip(RoundedCornerShape(dimensions().spacing8x)) .border( width = 1.dp, - color = MaterialTheme.wireColorScheme.secondaryButtonDisabledOutline, + color = MaterialTheme.wireColorScheme.outline, shape = RoundedCornerShape(dimensions().spacing8x) ), alignment = Alignment.Center, @@ -482,7 +482,7 @@ private fun MainContentText(text: String, fontStyle: FontStyle = FontStyle.Norma style = typography().subline01, maxLines = TEXT_QUOTE_MAX_LINES, overflow = TextOverflow.Ellipsis, - color = colorsScheme().secondaryText, + color = colorsScheme().onSurfaceVariant, fontStyle = fontStyle ) } diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/asset/AssetMessageTypes.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/asset/AssetMessageTypes.kt index e116eda6662..d33629006d6 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/asset/AssetMessageTypes.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/model/messagetypes/asset/AssetMessageTypes.kt @@ -79,7 +79,7 @@ internal fun MessageAsset( modifier = Modifier .padding(top = dimensions().spacing4x) .background( - color = MaterialTheme.wireColorScheme.onPrimary, + color = MaterialTheme.wireColorScheme.surfaceVariant, shape = RoundedCornerShape(dimensions().messageAssetBorderRadius) ) .border( diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationRouter.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationRouter.kt index 3129a138d9e..c63d0435355 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationRouter.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/ConversationRouter.kt @@ -216,7 +216,6 @@ fun ConversationRouterHomeBridge( isFromArchive = conversationsSource.isArchive(), hasNoConversations = hasNoConversations, onEditConversation = onEditConversationItem, - onOpenConversationNotificationsSettings = onEditNotifications, onOpenConversation = onOpenConversation, onOpenUserProfile = onOpenUserProfile, onJoinedCall = onJoinedCall, @@ -251,7 +250,6 @@ fun ConversationRouterHomeBridge( onOpenConversation = onOpenConversation, onEditConversation = onEditConversationItem, onOpenUserProfile = onOpenUserProfile, - onOpenConversationNotificationsSettings = onEditNotifications, onJoinCall = { viewModel.joinOngoingCall(it, onJoinedCall) }, onPermanentPermissionDecline = viewModel::showCallingPermissionDialog ) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/all/AllConversationScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/all/AllConversationScreen.kt index 5fbd63c1824..1a31285cfe1 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/all/AllConversationScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/all/AllConversationScreen.kt @@ -84,7 +84,6 @@ fun AllConversationScreenContent( isFromArchive: Boolean = false, viewModel: ConversationListViewModel = hiltViewModel(), onEditConversation: (ConversationItem) -> Unit, - onOpenConversationNotificationsSettings: (ConversationItem) -> Unit, onOpenConversation: (ConversationId) -> Unit, onOpenUserProfile: (UserId) -> Unit, onJoinedCall: (ConversationId) -> Unit, @@ -114,7 +113,6 @@ fun AllConversationScreenContent( onOpenConversation = onOpenConversation, onEditConversation = onEditConversation, onOpenUserProfile = onOpenUserProfile, - onOpenConversationNotificationsSettings = onOpenConversationNotificationsSettings, onJoinCall = { callConversationIdToJoin.value = it viewModel.joinOngoingCall(it, onJoinedCall) @@ -168,7 +166,6 @@ fun PreviewAllConversationScreen() { conversations = persistentMapOf(), hasNoConversations = false, onEditConversation = {}, - onOpenConversationNotificationsSettings = {}, onOpenConversation = {}, onOpenUserProfile = {}, onJoinedCall = {}, @@ -183,7 +180,6 @@ fun ConversationListEmptyStateScreenPreview() { conversations = persistentMapOf(), hasNoConversations = true, onEditConversation = {}, - onOpenConversationNotificationsSettings = {}, onOpenConversation = {}, onOpenUserProfile = {}, onJoinedCall = {}, diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/call/CallsScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/call/CallsScreen.kt index 3e2f800a085..8d818336ee7 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/call/CallsScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/call/CallsScreen.kt @@ -103,7 +103,6 @@ fun CallContent( openConversation = onCallItemClick, openMenu = onEditConversationItem, openUserProfile = onOpenUserProfile, - openNotificationsOptions = openConversationNotificationsSettings, joinCall = { }, onPermanentPermissionDecline = {}, searchQuery = "" @@ -119,7 +118,6 @@ fun CallContent( openConversation = onCallItemClick, openMenu = onEditConversationItem, openUserProfile = onOpenUserProfile, - openNotificationsOptions = openConversationNotificationsSettings, joinCall = { }, onPermanentPermissionDecline = {}, searchQuery = " " diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationItemFactory.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationItemFactory.kt index 5cd637842b8..19f18bd8d87 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationItemFactory.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationItemFactory.kt @@ -60,7 +60,6 @@ fun ConversationItemFactory( openConversation: (ConversationId) -> Unit, openMenu: (ConversationItem) -> Unit, openUserProfile: (UserId) -> Unit, - openNotificationsOptions: (ConversationItem) -> Unit, joinCall: (ConversationId) -> Unit, onPermanentPermissionDecline: () -> Unit ) { @@ -104,9 +103,6 @@ fun ConversationItemFactory( } }, onConversationItemClick = onConversationItemClick, - onMutedIconClick = { - openNotificationsOptions(conversation) - }, onJoinCallClick = { joinCall(conversation.conversationId) }, @@ -123,7 +119,6 @@ private fun GeneralConversationItem( isSelectable: Boolean, subTitle: @Composable () -> Unit = {}, onConversationItemClick: Clickable, - onMutedIconClick: () -> Unit, onJoinCallClick: () -> Unit, onPermanentPermissionDecline: () -> Unit ) { @@ -163,7 +158,7 @@ private fun GeneralConversationItem( horizontalArrangement = Arrangement.spacedBy(dimensions().spacing8x) ) { if (mutedStatus != MutedConversationStatus.AllAllowed) { - MutedConversationBadge(onMutedIconClick) + MutedConversationBadge() } EventBadgeFactory(eventType = conversation.badgeEventType) } @@ -202,7 +197,7 @@ private fun GeneralConversationItem( horizontalArrangement = Arrangement.spacedBy(dimensions().spacing8x) ) { if (mutedStatus != MutedConversationStatus.AllAllowed) { - MutedConversationBadge(onMutedIconClick) + MutedConversationBadge() } EventBadgeFactory(eventType = conversation.badgeEventType) } @@ -255,7 +250,7 @@ fun PreviewGroupConversationItemWithUnreadCount() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {}, ) } @@ -278,7 +273,7 @@ fun PreviewGroupConversationItemWithNoBadges() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {}, ) } @@ -301,7 +296,7 @@ fun PreviewGroupConversationItemWithMutedBadgeAndUnreadMentionBadge() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {}, ) } @@ -325,7 +320,7 @@ fun PreviewGroupConversationItemWithOngoingCall() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {}, ) } @@ -344,7 +339,7 @@ fun PreviewConnectionConversationItemWithReceivedConnectionRequestBadge() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {} ) } @@ -363,7 +358,7 @@ fun PreviewConnectionConversationItemWithSentConnectRequestBadge() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {} ) } @@ -386,6 +381,6 @@ fun PreviewPrivateConversationItemWithBlockedBadge() { searchQuery = "", isSelectableItem = false, isChecked = false, - {}, {}, {}, {}, {}, {}, {} + {}, {}, {}, {}, {}, {} ) } diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationList.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationList.kt index c0c54eac768..c1fa1f73dcf 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationList.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/ConversationList.kt @@ -50,7 +50,6 @@ fun ConversationList( onOpenConversation: (ConversationId) -> Unit, onEditConversation: (ConversationItem) -> Unit, onOpenUserProfile: (UserId) -> Unit, - onOpenConversationNotificationsSettings: (ConversationItem) -> Unit, onJoinCall: (ConversationId) -> Unit, onPermanentPermissionDecline: () -> Unit ) { @@ -93,7 +92,6 @@ fun ConversationList( openConversation = onOpenConversation, openMenu = onEditConversation, openUserProfile = onOpenUserProfile, - openNotificationsOptions = onOpenConversationNotificationsSettings, joinCall = onJoinCall, onPermanentPermissionDecline = onPermanentPermissionDecline ) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/MutedConversationBadge.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/MutedConversationBadge.kt index f15bea7d8e0..5a469bdd888 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/MutedConversationBadge.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/common/MutedConversationBadge.kt @@ -20,50 +20,57 @@ package com.wire.android.ui.home.conversationslist.common +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.DpSize +import androidx.compose.ui.unit.dp import com.wire.android.R -import com.wire.android.ui.common.button.WireSecondaryButton import com.wire.android.ui.common.colorsScheme import com.wire.android.ui.common.dimensions +import com.wire.android.ui.theme.wireColorScheme +import com.wire.android.util.ui.PreviewMultipleThemes @Composable -fun MutedConversationBadge(onClick: () -> Unit) { - Box(modifier = Modifier - .width(dimensions().spacing24x) - .height(dimensions().spacing20x)) { - WireSecondaryButton( - onClick = onClick, - leadingIcon = { - Icon( - painter = painterResource(id = R.drawable.ic_mute), - contentDescription = stringResource(R.string.content_description_muted_conversation), - modifier = Modifier.size(dimensions().spacing12x), - tint = colorsScheme().onSecondaryButtonEnabled - ) - }, - fillMaxWidth = false, - minSize = DpSize(width = dimensions().spacing24x, height = dimensions().spacing20x), - minClickableSize = DpSize(width = dimensions().spacing24x, height = dimensions().spacing20x), - shape = RoundedCornerShape(size = dimensions().spacing6x), - contentPadding = PaddingValues(dimensions().spacing0x), +fun MutedConversationBadge() { + Box( + modifier = Modifier + .width(dimensions().spacing24x) + .height(dimensions().spacing20x) + .padding(PaddingValues(dimensions().spacing0x)) + .clip(shape = RoundedCornerShape(size = dimensions().spacing6x)) + .clickable(enabled = false, onClick = {}) + .border( + width = 1.dp, + color = MaterialTheme.wireColorScheme.secondaryButtonDisabledOutline, + shape = RoundedCornerShape(dimensions().spacing6x) + ), + contentAlignment = Alignment.Center + ) { + Icon( + painter = painterResource(id = R.drawable.ic_mute), + contentDescription = stringResource(R.string.content_description_muted_conversation), + modifier = Modifier.size(dimensions().spacing12x), + tint = colorsScheme().onSecondaryButtonEnabled ) } } -@Preview +@PreviewMultipleThemes @Composable fun PreviewMutedConversationBadge() { - MutedConversationBadge {} + MutedConversationBadge() } diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/mention/MentionScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/mention/MentionScreen.kt index f64bcb6eade..ea5f611a1f2 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/mention/MentionScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/mention/MentionScreen.kt @@ -103,7 +103,6 @@ private fun MentionContent( openConversation = onMentionItemClick, openMenu = onEditConversationItem, openUserProfile = onOpenUserProfile, - openNotificationsOptions = openConversationNotificationsSettings, joinCall = {}, onPermanentPermissionDecline = {}, searchQuery = "" @@ -119,7 +118,6 @@ private fun MentionContent( openConversation = onMentionItemClick, openMenu = onEditConversationItem, openUserProfile = onOpenUserProfile, - openNotificationsOptions = openConversationNotificationsSettings, joinCall = {}, onPermanentPermissionDecline = {}, searchQuery = "" diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/search/SearchConversationScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/search/SearchConversationScreen.kt index 2eba829c3d4..7836920810b 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/search/SearchConversationScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversationslist/search/SearchConversationScreen.kt @@ -56,7 +56,6 @@ fun SearchConversationScreen( onOpenConversation: (ConversationId) -> Unit, onEditConversation: (ConversationItem) -> Unit, onOpenUserProfile: (UserId) -> Unit, - onOpenConversationNotificationsSettings: (ConversationItem) -> Unit, onJoinCall: (ConversationId) -> Unit, onPermanentPermissionDecline: () -> Unit ) { @@ -70,7 +69,6 @@ fun SearchConversationScreen( onOpenConversation = onOpenConversation, onEditConversation = onEditConversation, onOpenUserProfile = onOpenUserProfile, - onOpenConversationNotificationsSettings = onOpenConversationNotificationsSettings, onJoinCall = onJoinCall, onPermanentPermissionDecline = onPermanentPermissionDecline ) diff --git a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt index 17aefd8d32e..f045a281f52 100644 --- a/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/sharing/ImportMediaScreen.kt @@ -420,7 +420,6 @@ private fun ImportMediaContent( onOpenConversation = onConversationClicked, onEditConversation = {}, onOpenUserProfile = {}, - onOpenConversationNotificationsSettings = {}, onJoinCall = {}, onPermanentPermissionDecline = {} ) diff --git a/kalium b/kalium index 4d801fc83ff..a71fb6dab1a 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 4d801fc83ff23b824c987d4347e2d8083bd850c6 +Subproject commit a71fb6dab1a9c34bc9d05a291307db3fdcc07a99