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

Disable support shortcuts when not support mode.

Fixes #5453.
This commit is contained in:
John Preston
2018-12-13 12:48:31 +04:00
parent 980d20473a
commit e876c9b6a6
4 changed files with 36 additions and 12 deletions

View File

@@ -1210,7 +1210,7 @@ void MainWidget::closeBothPlayers() {
Media::Player::instance()->stop(AudioMsgId::Type::Voice);
Media::Player::instance()->stop(AudioMsgId::Type::Song);
Shortcuts::DisableMediaShortcuts();
Shortcuts::ToggleMediaShortcuts(false);
}
void MainWidget::createPlayer() {
@@ -1232,7 +1232,7 @@ void MainWidget::createPlayer() {
if (_a_show.animating()) {
_player->show(anim::type::instant);
_player->setVisible(false);
Shortcuts::EnableMediaShortcuts();
Shortcuts::ToggleMediaShortcuts(true);
} else {
_player->hide(anim::type::instant);
}
@@ -1242,7 +1242,7 @@ void MainWidget::createPlayer() {
_player->show(anim::type::normal);
_playerHeight = _contentScrollAddToY = _player->contentHeight();
updateControlsGeometry();
Shortcuts::EnableMediaShortcuts();
Shortcuts::ToggleMediaShortcuts(true);
}
}
}