Audio Player: Stop playing when message is deleted (#462)

This commit is contained in:
Shahaf 2025-09-05 19:33:01 +03:00 committed by GitHub
parent 5cb6236879
commit 08a4dd9117
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -167,6 +167,12 @@ const AudioPlayer: FC<OwnProps & StateProps> = ({
}
}, [timestamp, setCurrentTime]);
useEffect(() => {
if (isPlaying && message?.isDeleting) {
playPause();
}
}, [isPlaying, message?.isDeleting, playPause]);
const handleClick = useLastCallback(() => {
const { chatId, id } = renderingMessage!;
focusMessage({ chatId, messageId: id });