actually retrieve roles for guilds

FetchRoles isnt needed anymore cuz full roles are fetched now
This commit is contained in:
ouwou committed 2021-11-28 22:42:55 -05:00
1 parent 192b043e7a
commit e02107feea
7 files changed
+50 -36

No files matched your search

+4 -3
View File
@@ -238,9 +238,10 @@ GuildSettingsMembersPaneRoles::GuildSettingsMembersPaneRoles(Snowflake guild_id)
discord.signal_role_delete().connect(sigc::mem_fun(*this, &GuildSettingsMembersPaneRoles::OnRoleDelete));
const auto guild = *discord.GetGuild(guild_id);
const auto roles = guild.FetchRoles();
for (const auto &role : roles) {
CreateRow(can_modify, role, guild.OwnerID == self_id);
if (guild.Roles.has_value()) {
for (const auto &role : *guild.Roles) {
CreateRow(can_modify, role, guild.OwnerID == self_id);
}
}
m_list.set_sort_func([this](Gtk::ListBoxRow *a, Gtk::ListBoxRow *b) -> int {