aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-26 00:38:31 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-26 00:38:31 +0100
commite75fe2db48fea5663da43d6faf1c1e1d48de2c4f (patch)
tree59022bd661b5942e8d5427e1a29a80954ed69849
parent0c4fd4700d6ee31f6b848d49a6aa7ebfa4a806fa (diff)
Remove reply formatting from media file title in matrix media reply
-rw-r--r--TODO4
-rw-r--r--src/QuickMedia.cpp2
-rw-r--r--src/plugins/Matrix.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/TODO b/TODO
index 1fba57f..dd8887a 100644
--- a/TODO
+++ b/TODO
@@ -247,4 +247,6 @@ Atomic file operations should use a random generated name instead of .tmp, becau
TODO: https://github.com/matrix-org/synapse/issues/14444.
Use matrix /sync "since" param. Its beneficial even to quickmedia because synapse is written in such a way that using "since" is faster.
/encrypt should support formatted text like greentext, custom emoji, mentions etc.
-allow navigating to cross-post/dead thread with ctrl+i, fallback to 4chan archive if thread is dead, allow navigating to thread post in the same thread as well using archive to bring the post back alive, revive deleted images using archive. \ No newline at end of file
+allow navigating to cross-post/dead thread with ctrl+i, fallback to 4chan archive if thread is dead, allow navigating to thread post in the same thread as well using archive to bring the post back alive, revive deleted images using archive.
+Add option to open youtube/4chan links in a new instance of quickmedia (maybe with ctrl+enter?).
+AAAAA Resizing 4chan post with no images but with replies (reactions) gives incorrect body item height compared to the rendered height. \ No newline at end of file
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 9e8211a..92eb03c 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -6672,7 +6672,7 @@ namespace QuickMedia {
const char *music_prefix = "🎵 Play ";
const char *file_prefix = "💾 Download ";
- std::string filename = selected_item_message->body;
+ std::string filename = message_to_qm_text(matrix, selected_item_message, false);
if(string_starts_with(filename, video_prefix))
filename.erase(filename.begin(), filename.begin() + strlen(video_prefix));
else if(string_starts_with(filename, music_prefix))
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 953543c..d93c64a 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -263,7 +263,7 @@ namespace QuickMedia {
return colors[color_hash_code(user_id) % num_colors];
}
- std::string formatted_text_remove_reply(const std::string &str) {
+ static std::string formatted_text_remove_reply(const std::string &str) {
size_t last_mx_reply_end = str.rfind("</mx-reply>");
if(last_mx_reply_end == std::string::npos)
return str;