Skip to content

Commit

Permalink
chore: hide conversation favorite filter [WPB-14923] (#3724)
Browse files Browse the repository at this point in the history
  • Loading branch information
Garzas authored Dec 10, 2024
1 parent 062f329 commit 7602733
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fun ConversationFilterSheetContent(
customVerticalPadding = dimensions().spacing8x
),
menuItems = buildList<@Composable () -> Unit> {
ConversationFilter.entries.forEach { filter ->
ConversationFilter.entries.filter { it != ConversationFilter.FAVORITES }.forEach { filter ->
add {
MenuBottomSheetItem(
title = stringResource(filter.getResource()),
Expand Down

0 comments on commit 7602733

Please sign in to comment.