Browse Source

CHANGE | Make sticker message selectable (#32)

BANK-1145: Масові дії з повідомленнями в додатку
Reviewed-on: #32
Co-authored-by: Oksana Stepanenko <oksana.stepanenko@jetup.team>
Co-committed-by: Oksana Stepanenko <oksana.stepanenko@jetup.team>
pull/33/head
Oksana Stepanenko 8 months ago committed by Vitalik Yatsenko
parent
commit
819a5d0c6a
  1. 5
      src/modules/chats/hooks/use-selected-messages.hook.ts
  2. 3
      src/shared/components/plugins/chat/chat-item.component.tsx

5
src/modules/chats/hooks/use-selected-messages.hook.ts

@ -155,7 +155,10 @@ export const useChatSelectedMessages = () => { @@ -155,7 +155,10 @@ export const useChatSelectedMessages = () => {
userRoleInChat: ChatMemberRole,
isConnected: boolean,
) => {
const canShare = isConnected && messages.length === 1
const canShare =
isConnected &&
messages.length === 1 &&
messages[0].type !== MessageType.Sticker
const canCopy = checkCanCopy()
const canDeleteForAll = checkCanDeleteForAll()
const hasOfflineMessages = _.some(messages, it =>

3
src/shared/components/plugins/chat/chat-item.component.tsx

@ -47,7 +47,8 @@ export const ChatItem: FC<ChatItemProps> = ({ @@ -47,7 +47,8 @@ export const ChatItem: FC<ChatItemProps> = ({
props.type === MessageType.Image ||
props.type === MessageType.Video ||
props.type === MessageType.Audio ||
props.type === MessageType.File
props.type === MessageType.File ||
props.type === MessageType.Sticker
)
}, [viewMode, props.type])

Loading…
Cancel
Save