From 1251d89ef0577c9d450a8581d52dd94b67a45075 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 7 Apr 2021 20:42:53 -0400 Subject: use discord's default avatars instead of placeholder --- windows/profile/mutualfriendspane.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'windows/profile/mutualfriendspane.cpp') diff --git a/windows/profile/mutualfriendspane.cpp b/windows/profile/mutualfriendspane.cpp index e0d6fc4..7d30453 100644 --- a/windows/profile/mutualfriendspane.cpp +++ b/windows/profile/mutualfriendspane.cpp @@ -12,18 +12,16 @@ MutualFriendItem::MutualFriendItem(const UserData &user) const auto show_animations = Abaddon::Get().GetSettings().GetShowAnimations(); auto &img = Abaddon::Get().GetImageManager(); m_avatar.property_pixbuf() = img.GetPlaceholder(24); - if (user.HasAvatar()) { - if (user.HasAnimatedAvatar() && show_animations) { - auto cb = [this](const Glib::RefPtr &pb) { - m_avatar.property_pixbuf_animation() = pb; - }; - img.LoadAnimationFromURL(user.GetAvatarURL("gif", "32"), 24, 24, sigc::track_obj(cb, *this)); - } else { - auto cb = [this](const Glib::RefPtr &pb) { - m_avatar.property_pixbuf() = pb->scale_simple(24, 24, Gdk::INTERP_BILINEAR); - }; - img.LoadFromURL(user.GetAvatarURL("png", "32"), sigc::track_obj(cb, *this)); - } + if (user.HasAnimatedAvatar() && show_animations) { + auto cb = [this](const Glib::RefPtr &pb) { + m_avatar.property_pixbuf_animation() = pb; + }; + img.LoadAnimationFromURL(user.GetAvatarURL("gif", "32"), 24, 24, sigc::track_obj(cb, *this)); + } else { + auto cb = [this](const Glib::RefPtr &pb) { + m_avatar.property_pixbuf() = pb->scale_simple(24, 24, Gdk::INTERP_BILINEAR); + }; + img.LoadFromURL(user.GetAvatarURL("png", "32"), sigc::track_obj(cb, *this)); } m_name.set_markup(user.GetEscapedBoldString()); -- cgit v1.2.3