Audio Player: Stop playing when message is deleted (#462)
This commit is contained in:
parent
5cb6236879
commit
08a4dd9117
@ -167,6 +167,12 @@ const AudioPlayer: FC<OwnProps & StateProps> = ({
|
|||||||
}
|
}
|
||||||
}, [timestamp, setCurrentTime]);
|
}, [timestamp, setCurrentTime]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (isPlaying && message?.isDeleting) {
|
||||||
|
playPause();
|
||||||
|
}
|
||||||
|
}, [isPlaying, message?.isDeleting, playPause]);
|
||||||
|
|
||||||
const handleClick = useLastCallback(() => {
|
const handleClick = useLastCallback(() => {
|
||||||
const { chatId, id } = renderingMessage!;
|
const { chatId, id } = renderingMessage!;
|
||||||
focusMessage({ chatId, messageId: id });
|
focusMessage({ chatId, messageId: id });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user