diff options
Diffstat (limited to 'components/friendslist.cpp')
-rw-r--r-- | components/friendslist.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/components/friendslist.cpp b/components/friendslist.cpp index 09cbfff..029c5a1 100644 --- a/components/friendslist.cpp +++ b/components/friendslist.cpp @@ -96,7 +96,7 @@ FriendsListAddComponent::FriendsListAddComponent() , m_label("Add a Friend", Gtk::ALIGN_START) , m_box(Gtk::ORIENTATION_HORIZONTAL) , m_add("Add") - , m_status("Failed to whatever lol", Gtk::ALIGN_START) { + , m_status("", Gtk::ALIGN_START) { m_box.add(m_entry); m_box.add(m_add); m_box.add(m_status); @@ -119,8 +119,7 @@ FriendsListFriendRow::FriendsListFriendRow(RelationshipType type, const UserData auto *box = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL)); auto *img = Gtk::manage(new LazyImage(32, 32, true)); auto *namelbl = Gtk::manage(new Gtk::Label(Name, Gtk::ALIGN_START)); - const auto status = Abaddon::Get().GetDiscordClient().GetUserStatus(data.ID); - auto *statuslbl = Gtk::manage(new Gtk::Label(GetPresenceDisplayString(status), Gtk::ALIGN_START)); + auto *statuslbl = Gtk::manage(new Gtk::Label("", Gtk::ALIGN_START)); auto *lblbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); if (data.HasAnimatedAvatar()) { @@ -130,6 +129,18 @@ FriendsListFriendRow::FriendsListFriendRow(RelationshipType type, const UserData img->SetURL(data.GetAvatarURL("png", "32")); } + switch (Type) { + case RelationshipType::PendingIncoming: + statuslbl->set_text("Incoming Friend Request"); + break; + case RelationshipType::PendingOutgoing: + statuslbl->set_text("Outgoing Friend Request"); + break; + default: + statuslbl->set_text(GetPresenceDisplayString(Abaddon::Get().GetDiscordClient().GetUserStatus(data.ID))); + break; + } + AddWidgetMenuHandler(ev, m_menu, [this] { switch (Type) { case RelationshipType::Blocked: |