summaryrefslogtreecommitdiff
path: root/src/components/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/channels.cpp')
-rw-r--r--src/components/channels.cpp12
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)