summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-02-02 22:27:19 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2022-02-02 22:27:19 -0500
commitf7845509646b6ddaab7209fac0d8caac77e9aa2c (patch)
tree1aff88ba59abb86cf2e39377d7f9f35f96c0e05d /src/components
parentce238d08e96aafc956b5ecd7cf00796a227c5666 (diff)
downloadabaddon-portaudio-f7845509646b6ddaab7209fac0d8caac77e9aa2c.tar.gz
abaddon-portaudio-f7845509646b6ddaab7209fac0d8caac77e9aa2c.zip
support channel icons for dms
Diffstat (limited to 'src/components')
-rw-r--r--src/components/channels.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp
index c0d1a8b..99bd07b 100644
--- a/src/components/channels.cpp
+++ b/src/components/channels.cpp
@@ -752,7 +752,13 @@ void ChannelList::AddPrivateChannels() {
else if (dm->Type == ChannelType::GROUP_DM)
row[m_columns.m_name] = std::to_string(recipients.size()) + " members";
- if (top_recipient.has_value()) {
+ if (dm->HasIcon()) {
+ const auto cb = [this, iter](const Glib::RefPtr<Gdk::Pixbuf> &pb) {
+ if (iter)
+ (*iter)[m_columns.m_icon] = pb->scale_simple(DMIconSize, DMIconSize, Gdk::INTERP_BILINEAR);
+ };
+ img.LoadFromURL(dm->GetIconURL(), sigc::track_obj(cb, *this));
+ } else if (top_recipient.has_value()) {
const auto cb = [this, iter](const Glib::RefPtr<Gdk::Pixbuf> &pb) {
if (iter)
(*iter)[m_columns.m_icon] = pb->scale_simple(DMIconSize, DMIconSize, Gdk::INTERP_BILINEAR);