mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Merge branch 'master' of https://github.com/telegramdesktop/tdesktop
This commit is contained in:
@@ -975,8 +975,13 @@ void DocumentOpenClickHandler::doOpen(DocumentData *data, ActionOnLoad action) {
|
||||
audioPlayer()->play(song);
|
||||
if (App::main()) App::main()->documentPlayProgress(song);
|
||||
}
|
||||
} else if (data->voice() || data->isVideo()) {
|
||||
psOpenFile(location.name());
|
||||
} else if (data->voice() || data->song() || data->isVideo()) {
|
||||
auto filepath = location.name();
|
||||
if (documentIsValidMediaFile(filepath)) {
|
||||
psOpenFile(filepath);
|
||||
} else {
|
||||
psShowInFolder(filepath);
|
||||
}
|
||||
if (App::main()) App::main()->mediaMarkRead(data);
|
||||
} else if (data->size < MediaViewImageSizeLimit) {
|
||||
if (!data->data().isEmpty() && playAnimation) {
|
||||
@@ -1270,8 +1275,12 @@ void DocumentData::performActionOnLoad() {
|
||||
psOpenFile(already, true);
|
||||
}
|
||||
} else if (_actionOnLoad == ActionOnLoadOpen || _actionOnLoad == ActionOnLoadPlayInline) {
|
||||
if (voice() || isVideo()) {
|
||||
psOpenFile(already);
|
||||
if (voice() || song() || isVideo()) {
|
||||
if (documentIsValidMediaFile(already)) {
|
||||
psOpenFile(already);
|
||||
} else {
|
||||
psShowInFolder(already);
|
||||
}
|
||||
if (App::main()) App::main()->mediaMarkRead(this);
|
||||
} else if (loc.accessEnable()) {
|
||||
if (showImage && QImageReader(loc.name()).canRead()) {
|
||||
|
Reference in New Issue
Block a user