Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: hide conversation favorite filter [WPB-14923] #3724

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading