Disable PiP for unsupported cases (such as animated avatars)
This commit is contained in:
parent
8ceccc2bcb
commit
512f93d5d3
3 changed files with 7 additions and 1 deletions
|
|
@ -257,5 +257,6 @@
|
|||
"ktg_disable_chat_themes": "Disable chat themes",
|
||||
"ktg_settings_remember_compress_images": "Remember compress images",
|
||||
"ktg_settings_compress_images_default": "Compress images by default",
|
||||
"ktg_pip_not_supported": "Sorry, Picture-in-Picture mode is not supported here.",
|
||||
"dummy_last_string": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,5 +257,6 @@
|
|||
"ktg_disable_chat_themes": "Отключить темы чатов",
|
||||
"ktg_settings_remember_compress_images": "Запоминать сжатие изображений",
|
||||
"ktg_settings_compress_images_default": "Сжимать изображения по умолчанию",
|
||||
"ktg_pip_not_supported": "К сожалению, режим «Картинка-в-картинке» здесь не поддерживается.",
|
||||
"dummy_last_string": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
*/
|
||||
#include "media/view/media_view_overlay_widget.h"
|
||||
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "apiwrap.h"
|
||||
#include "api/api_attached_stickers.h"
|
||||
#include "api/api_peer_photo.h"
|
||||
|
|
@ -3136,8 +3137,11 @@ float64 OverlayWidget::playbackControlsCurrentSpeed() {
|
|||
}
|
||||
|
||||
void OverlayWidget::switchToPip() {
|
||||
if (_document == nullptr) {
|
||||
Ui::Toast::Show(_widget, ktr("ktg_pip_not_supported"));
|
||||
return;
|
||||
}
|
||||
Expects(_streamed != nullptr);
|
||||
Expects(_document != nullptr);
|
||||
|
||||
const auto document = _document;
|
||||
const auto message = _message;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue