diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-01-21 01:02:14 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-01-21 01:02:14 -0500 |
commit | fea6db3394d0283d28b7e03b74c34b0296b9b59f (patch) | |
tree | b8631ee90631b3b96eba8de854aee6591c964d9f /src/components | |
parent | dc7047265f70c68946298ec09a43e105484caad3 (diff) | |
download | abaddon-portaudio-fea6db3394d0283d28b7e03b74c34b0296b9b59f.tar.gz abaddon-portaudio-fea6db3394d0283d28b7e03b74c34b0296b9b59f.zip |
mimic discord group dm naming scheme (closes #133)
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/channels.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp index 497c021..88e5a71 100644 --- a/src/components/channels.cpp +++ b/src/components/channels.cpp @@ -759,14 +759,10 @@ void ChannelList::AddPrivateChannels() { auto row = *iter; row[m_columns.m_type] = RenderType::DM; row[m_columns.m_id] = dm_id; + row[m_columns.m_name] = Glib::Markup::escape_text(dm->GetDisplayName()); row[m_columns.m_sort] = static_cast<int64_t>(-(dm->LastMessageID.has_value() ? *dm->LastMessageID : dm_id)); row[m_columns.m_icon] = img.GetPlaceholder(DMIconSize); - if (dm->Type == ChannelType::DM && top_recipient.has_value()) - row[m_columns.m_name] = Glib::Markup::escape_text(top_recipient->Username); - else if (dm->Type == ChannelType::GROUP_DM) - row[m_columns.m_name] = std::to_string(recipients.size()) + " members"; - if (dm->HasIcon()) { const auto cb = [this, iter](const Glib::RefPtr<Gdk::Pixbuf> &pb) { if (iter) @@ -796,14 +792,10 @@ void ChannelList::UpdateCreateDMChannel(const ChannelData &dm) { auto row = *iter; row[m_columns.m_type] = RenderType::DM; row[m_columns.m_id] = dm.ID; + row[m_columns.m_name] = Glib::Markup::escape_text(dm.GetDisplayName()); row[m_columns.m_sort] = static_cast<int64_t>(-(dm.LastMessageID.has_value() ? *dm.LastMessageID : dm.ID)); row[m_columns.m_icon] = img.GetPlaceholder(DMIconSize); - if (dm.Type == ChannelType::DM && top_recipient.has_value()) - row[m_columns.m_name] = Glib::Markup::escape_text(top_recipient->Username); - else if (dm.Type == ChannelType::GROUP_DM) - row[m_columns.m_name] = std::to_string(recipients.size()) + " members"; - if (top_recipient.has_value()) { const auto cb = [this, iter](const Glib::RefPtr<Gdk::Pixbuf> &pb) { if (iter) |