diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-23 17:27:38 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-23 17:27:38 -0500 |
commit | 04734e7e55366e3138f7d818f5267e76fbfa1041 (patch) | |
tree | 3fbaca6c2c964c1f7eb4df3ffa4fdc894e82b6a5 /discord/discord.cpp | |
parent | b28bfd6f208bc04b4157130eabfcf61b1825570d (diff) | |
download | abaddon-portaudio-04734e7e55366e3138f7d818f5267e76fbfa1041.tar.gz abaddon-portaudio-04734e7e55366e3138f7d818f5267e76fbfa1041.zip |
fix guild order
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r-- | discord/discord.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp index 531651f..03e7df3 100644 --- a/discord/discord.cpp +++ b/discord/discord.cpp @@ -75,14 +75,19 @@ std::vector<Snowflake> DiscordClient::GetUserSortedGuilds() const { folder_order.push_back(id); } } + std::vector<Snowflake> ret; for (const auto &gid : guilds) { if (std::find(folder_order.begin(), folder_order.end(), gid) == folder_order.end()) { ret.push_back(gid); } } + + std::sort(ret.rbegin(), ret.rend()); + for (const auto &gid : folder_order) ret.push_back(gid); + return ret; } |