2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Stop playing documents when items are deleted.

This commit is contained in:
John Preston
2020-10-23 15:22:38 +03:00
parent 47bb8ec687
commit 3d54a263b8
8 changed files with 49 additions and 4 deletions

View File

@@ -349,6 +349,11 @@ MainWidget::MainWidget(
if (!songState.id || IsStoppedOrStopping(songState.state)) {
closeBothPlayers();
}
} else if (type == AudioMsgId::Type::Song) {
const auto songState = Media::Player::instance()->getState(AudioMsgId::Type::Song);
if (!songState.id) {
closeBothPlayers();
}
}
});