@@ -29,7 +29,7 @@ import {
2929 enterEditMessageMode ,
3030} from './messageFunctions'
3131import Attachment from '../attachment/messageAttachment'
32- import { isGenericAttachment , isImage , isVideo } from '../attachment/Attachment'
32+ import { isGenericAttachment , isImage } from '../attachment/Attachment'
3333import { runtime } from '@deltachat-desktop/runtime-interface'
3434import { ConversationType } from './MessageList'
3535import { getDirection } from '../../utils/getDirection'
@@ -289,7 +289,7 @@ function buildContextMenu(
289289 }
290290
291291 const showAttachmentOptions = ! ! message . file
292- const showCopyImage = ! ! message . file && message . viewType === 'Image'
292+ const showCopyImage = ! ! message . file && isImage ( message . viewType )
293293 const showResend =
294294 message . sender . id === C . DC_CONTACT_ID_SELF && message . viewType !== 'Call'
295295
@@ -389,7 +389,7 @@ function buildContextMenu(
389389 // Open Attachment
390390 showAttachmentOptions &&
391391 message . viewType !== 'Webxdc' &&
392- isGenericAttachment ( message . fileMime ) && {
392+ isGenericAttachment ( message . viewType ) && {
393393 label : tx ( 'open_attachment' ) ,
394394 action : openAttachmentInShell . bind ( null , message ) ,
395395 } ,
@@ -692,7 +692,8 @@ export default function Message(props: {
692692 // set message width which is used by reaction component
693693 // to adapt the number of visible reactions
694694 if (
695- ( message . fileMime && isImage ( message . fileMime ) ) ||
695+ isImage ( message . viewType ) ||
696+ message . viewType === 'Sticker' ||
696697 window . innerWidth < 900
697698 ) {
698699 // image messages have a defined width
@@ -712,7 +713,7 @@ export default function Message(props: {
712713 return ( ) => {
713714 window . removeEventListener ( 'resize' , resizeHandler )
714715 }
715- } , [ message . fileMime ] )
716+ } , [ message . viewType ] )
716717
717718 // Info Message
718719 if ( message . isInfo ) {
@@ -864,7 +865,7 @@ export default function Message(props: {
864865
865866 const hasText = text !== null && text !== ''
866867 const fileMime = message . fileMime || null
867- const isWithoutText = isMediaWithoutText ( fileMime , hasText , message . viewType )
868+ const isWithoutText = isMediaWithoutText ( hasText , message . viewType )
868869 const showAttachment = ( message : T . Message ) =>
869870 message . file &&
870871 message . viewType !== 'Webxdc' &&
@@ -879,7 +880,7 @@ export default function Message(props: {
879880 direction ,
880881 styles . message ,
881882 rovingTabindex . className ,
882- isWithoutText && isVideo ( fileMime ) ? 'video-only' : '' ,
883+ isWithoutText && viewType === 'Video' ? 'video-only' : '' ,
883884 {
884885 [ styles . withReactions ] : message . reactions ,
885886 'type-sticker' : viewType === 'Sticker' ,
0 commit comments