summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-12-18 01:13:31 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2020-12-18 01:13:31 -0500
commit3916a50bf9a7b49a77d7c76b1e41a7773a04f53f (patch)
treefaa5decb5593b27686c7c1d4ff1c37305d634b1f /components
parent776c350eb654c78a21a6163dcc82d802039c76e6 (diff)
downloadabaddon-portaudio-3916a50bf9a7b49a77d7c76b1e41a7773a04f53f.tar.gz
abaddon-portaudio-3916a50bf9a7b49a77d7c76b1e41a7773a04f53f.zip
add prefetch (default off)
Diffstat (limited to 'components')
-rw-r--r--components/chatmessage.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/chatmessage.cpp b/components/chatmessage.cpp
index 796c468..dc8d670 100644
--- a/components/chatmessage.cpp
+++ b/components/chatmessage.cpp
@@ -56,8 +56,7 @@ ChatMessageItemContainer *ChatMessageItemContainer::FromMessage(Snowflake id) {
// i dont think attachments can be edited
// also this can definitely be done much better holy shit
for (const auto &a : data->Attachments) {
- const auto last3 = a.ProxyURL.substr(a.ProxyURL.length() - 3);
- if (last3 == "png" || last3 == "jpg") {
+ if (IsURLViewableImage(a.ProxyURL)) {
auto *widget = container->CreateImageComponent(a);
container->m_main->add(*widget);
} else {