From 7dda4fef41953813df7c6a4b055c3d1cb1d68413 Mon Sep 17 00:00:00 2001 From: Jakub Zerko Date: Tue, 10 Dec 2024 15:38:35 +0100 Subject: [PATCH] hide add/remove from favorites --- .../conversation/HomeSheetContent.kt | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/common/bottomsheet/conversation/HomeSheetContent.kt b/app/src/main/kotlin/com/wire/android/ui/common/bottomsheet/conversation/HomeSheetContent.kt index c06603826aa..547168ba709 100644 --- a/app/src/main/kotlin/com/wire/android/ui/common/bottomsheet/conversation/HomeSheetContent.kt +++ b/app/src/main/kotlin/com/wire/android/ui/common/bottomsheet/conversation/HomeSheetContent.kt @@ -54,7 +54,7 @@ import com.wire.kalium.logic.data.conversation.MutedConversationStatus import com.wire.kalium.logic.data.user.ConnectionState // items cannot be simplified -@Suppress("CyclomaticComplexMethod") +@Suppress("CyclomaticComplexMethod", "UnusedParameter") @Composable internal fun ConversationMainSheetContent( conversationSheetContent: ConversationSheetContent, @@ -110,37 +110,37 @@ internal fun ConversationMainSheetContent( ) } } - - if (conversationSheetContent.canAddToFavourite() && !conversationSheetContent.isArchived) { - conversationSheetContent.isFavorite?.let { isFavorite -> - add { - MenuBottomSheetItem( - title = stringResource( - if (isFavorite) { - R.string.label_remove_from_favourites - } else { - R.string.label_add_to_favourites - } - ), - leading = { - MenuItemIcon( - id = R.drawable.ic_favourite, - contentDescription = null - ) - }, - onItemClick = { - changeFavoriteState( - GroupDialogState( - conversationSheetContent.conversationId, - conversationSheetContent.title - ), - !isFavorite - ) - } - ) - } - } - } +// TODO restore on 4.11 +// if (conversationSheetContent.canAddToFavourite() && !conversationSheetContent.isArchived) { +// conversationSheetContent.isFavorite?.let { isFavorite -> +// add { +// MenuBottomSheetItem( +// title = stringResource( +// if (isFavorite) { +// R.string.label_remove_from_favourites +// } else { +// R.string.label_add_to_favourites +// } +// ), +// leading = { +// MenuItemIcon( +// id = R.drawable.ic_favourite, +// contentDescription = null +// ) +// }, +// onItemClick = { +// changeFavoriteState( +// GroupDialogState( +// conversationSheetContent.conversationId, +// conversationSheetContent.title +// ), +// !isFavorite +// ) +// } +// ) +// } +// } +// } // TODO(profile): enable when implemented // add { // MenuBottomSheetItem(