aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-12 22:03:52 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-12 22:03:52 +0200
commit34329ff4ca3b8805ef893b3da67735bcaa460edf (patch)
tree0dad196f5a04e49fc8eb1385cb4fa29f5c477d48 /src
parenta44289aef22edb067198fedb5e51877400679702 (diff)
Allow downloading files on matrix. Also download the file with enter
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 3df2973..f8339a0 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -4720,6 +4720,9 @@ namespace QuickMedia {
no_video = prev_no_video;
redraw = true;
return true;
+ } else if(message_type == MessageType::FILE) {
+ download_async_gui(selected->url, false, no_video);
+ return true;
}
launch_url(selected->url);
@@ -4758,7 +4761,7 @@ namespace QuickMedia {
if(selected_item_message) {
MessageType message_type = selected_item_message->type;
- if(!selected->url.empty() && (message_type == MessageType::VIDEO || message_type == MessageType::IMAGE || message_type == MessageType::AUDIO)) {
+ if(!selected->url.empty() && message_type >= MessageType::IMAGE && message_type <= MessageType::FILE) {
download_async_gui(selected->url, false, no_video);
return true;
}