Skip to content

Commit

Permalink
chore: added disabled mark to delete message action
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Jul 9, 2023
1 parent f402633 commit d8616e5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ const useGetMessagePressActions = <T extends SendbirdGroupChannel | SendbirdOpen
onPress: () => onEditMessage(msg),
},
{
// TODO: disabled if message has a parentMessageId
// disabled: Boolean(msg.parentMessageId),
icon: 'delete',
title: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE,
onPress: () => confirmDelete(msg),
Expand Down Expand Up @@ -327,6 +329,8 @@ const useGetMessagePressActions = <T extends SendbirdGroupChannel | SendbirdOpen
if (!channel.isEphemeral) {
if (isMyMessage(msg, currentUserId) && msg.sendingStatus === 'succeeded') {
sheetItems.push({
// TODO: disabled if message has a parentMessageId
// disabled: Boolean(msg.parentMessageId),
icon: 'delete',
title: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE,
onPress: () => confirmDelete(msg),
Expand Down

0 comments on commit d8616e5

Please sign in to comment.