fix multi select including audio messages

pull/3064/head v1.8.4
Audric Ackermann 3 years ago
parent 84fd12ca62
commit 02612280c3
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -7,6 +7,7 @@ import { setNextMessageToPlayId } from '../../state/ducks/conversations';
import {
getNextMessageToPlayId,
getSortedMessagesOfSelectedConversation,
isMessageSelectionMode,
} from '../../state/selectors/conversations';
import { getAudioAutoplay } from '../../state/selectors/userConfig';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
@ -25,6 +26,7 @@ export const AudioPlayerWithEncryptedFile = (props: {
const autoPlaySetting = useSelector(getAudioAutoplay);
const messageProps = useSelector(getSortedMessagesOfSelectedConversation);
const nextMessageToPlayId = useSelector(getNextMessageToPlayId);
const multiSelectMode = useSelector(isMessageSelectionMode);
useEffect(() => {
// updates playback speed to value selected in context menu
@ -82,6 +84,7 @@ export const AudioPlayerWithEncryptedFile = (props: {
<H5AudioPlayer
src={urlToLoad}
preload="metadata"
style={{ pointerEvents: multiSelectMode ? 'none' : 'inherit' }}
layout="horizontal-reverse"
showSkipControls={false}
showJumpControls={false}

@ -134,7 +134,11 @@ export const MessageAttachment = (props: Props) => {
<div
role="main"
onClick={(e: any) => {
if (multiSelectMode) {
dispatch(toggleSelectedMessageId(messageId));
}
e.stopPropagation();
e.preventDefault();
}}
style={{ padding: '5px 10px' }}
>

Loading…
Cancel
Save