hide pin/unpin if no perms, allow viewing pins in dm

This commit is contained in:
ouwou
2021-08-21 03:48:24 -04:00
parent b659e3bc91
commit 5c63fe9487
3 changed files with 12 additions and 5 deletions

View File

@@ -244,7 +244,7 @@ void MainWindow::OnViewSubmenuPopup(const Gdk::Rectangle *flipped_rect, const Gd
auto channel = Abaddon::Get().GetDiscordClient().GetChannel(channel_id);
m_menu_view_pins.set_sensitive(false);
if (channel.has_value())
m_menu_view_pins.set_sensitive(channel->Type == ChannelType::GUILD_TEXT);
m_menu_view_pins.set_sensitive(channel->Type == ChannelType::GUILD_TEXT || channel->Type == ChannelType::DM || channel->Type == ChannelType::GROUP_DM);
}
ChannelList *MainWindow::GetChannelList() {