mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
make window title consistent (#133)
This commit is contained in:
1 parent
dccc6d2f4a
commit
7cd63de400
1 file changed
+1
-13
+1
-13
@@ -725,19 +725,7 @@ void Abaddon::ActionChannelOpened(Snowflake id, bool expand_to) {
|
||||
|
||||
const bool can_access = channel->IsDM() || m_discord.HasChannelPermission(m_discord.GetUserData().ID, id, Permission::VIEW_CHANNEL);
|
||||
|
||||
if (channel->Type == ChannelType::GUILD_TEXT || channel->Type == ChannelType::GUILD_NEWS)
|
||||
m_main_window->set_title(std::string(APP_TITLE) + " - #" + *channel->Name);
|
||||
else {
|
||||
std::string display;
|
||||
const auto recipients = channel->GetDMRecipients();
|
||||
if (recipients.size() > 1)
|
||||
display = std::to_string(recipients.size()) + " users";
|
||||
else if (recipients.size() == 1)
|
||||
display = recipients[0].Username;
|
||||
else
|
||||
display = "Empty group";
|
||||
m_main_window->set_title(std::string(APP_TITLE) + " - " + display);
|
||||
}
|
||||
m_main_window->set_title(std::string(APP_TITLE) + " - " + channel->GetDisplayName());
|
||||
m_main_window->UpdateChatActiveChannel(id, expand_to);
|
||||
if (m_channels_requested.find(id) == m_channels_requested.end()) {
|
||||
// dont fire requests we know will fail
|
||||
|
||||
Reference in new issue
Block a user