Skip to content

Commit

Permalink
hide add/remove from favorites
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas committed Dec 10, 2024
1 parent f4d044c commit 7dda4fe
Showing 1 changed file with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 7dda4fe

Please sign in to comment.