fix build (again ffs)

This commit is contained in:
ouwou
2021-04-05 02:49:11 -04:00
parent 08d604f836
commit 6acd65fbaa
4 changed files with 6 additions and 6 deletions

View File

@@ -161,7 +161,7 @@ void Completer::CompleteEmojis(const Glib::ustring &term) {
};
int i = 0;
if (discord.GetSelfPremiumType() == PremiumType::None) {
if (discord.GetSelfPremiumType() == EPremiumType::None) {
if (channel->GuildID.has_value()) {
const auto guild = discord.GetGuild(*channel->GuildID);

View File

@@ -1617,11 +1617,11 @@ std::set<Snowflake> DiscordClient::GetPrivateChannels() const {
return ret;
}
PremiumType DiscordClient::GetSelfPremiumType() const {
EPremiumType DiscordClient::GetSelfPremiumType() const {
const auto &data = GetUserData();
if (data.PremiumType.has_value())
return *data.PremiumType;
return PremiumType::None;
return EPremiumType::None;
}
void DiscordClient::HeartbeatThread() {

View File

@@ -75,7 +75,7 @@ public:
std::set<Snowflake> GetMessagesForChannel(Snowflake id) const;
std::set<Snowflake> GetPrivateChannels() const;
PremiumType GetSelfPremiumType() const;
EPremiumType GetSelfPremiumType() const;
void FetchMessagesInChannel(Snowflake id, std::function<void(const std::vector<Snowflake> &)> cb);
void FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake before_id, std::function<void(const std::vector<Snowflake> &)> cb);

View File

@@ -3,7 +3,7 @@
#include "json.hpp"
#include <string>
enum class PremiumType {
enum class EPremiumType {
None = 0,
NitroClassic = 1,
Nitro = 2,
@@ -42,7 +42,7 @@ struct UserData {
std::optional<bool> IsVerified;
std::optional<std::string> Email; // null
std::optional<uint64_t> Flags;
std::optional<PremiumType> PremiumType; // null
std::optional<EPremiumType> PremiumType; // null
std::optional<uint64_t> PublicFlags;
// undocumented (opt)