Increase max number of blocked users loaded from 100 to 1,000 (#4721)
Also includes a little refactor of how the requests are made & how the blocked users are stored
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "util/QStringHash.hpp"
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
|
||||
#include <pajlada/serialize.hpp>
|
||||
@@ -31,6 +32,16 @@ struct TwitchUser {
|
||||
{
|
||||
return this->id < rhs.id;
|
||||
}
|
||||
|
||||
bool operator==(const TwitchUser &rhs) const
|
||||
{
|
||||
return this->id == rhs.id;
|
||||
}
|
||||
|
||||
bool operator!=(const TwitchUser &rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace chatterino
|
||||
@@ -75,3 +86,11 @@ struct Deserialize<chatterino::TwitchUser> {
|
||||
};
|
||||
|
||||
} // namespace pajlada
|
||||
|
||||
template <>
|
||||
struct std::hash<chatterino::TwitchUser> {
|
||||
inline size_t operator()(const chatterino::TwitchUser &user) const noexcept
|
||||
{
|
||||
return std::hash<QString>{}(user.id);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user