mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Add some mini comments
This commit is contained in:
parent
54da03a5bd
commit
2e4b10a737
1 changed files with 15 additions and 0 deletions
|
@ -17,8 +17,14 @@ using EmotePtr = std::shared_ptr<const Emote>;
|
|||
class ChatterinoBadges
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Makes a network request to load Chatterino user badges
|
||||
*/
|
||||
ChatterinoBadges();
|
||||
|
||||
/**
|
||||
* Returns the Chatterino badge for the given user
|
||||
*/
|
||||
std::optional<EmotePtr> getBadge(const UserId &id);
|
||||
|
||||
private:
|
||||
|
@ -26,7 +32,16 @@ private:
|
|||
|
||||
std::shared_mutex mutex_;
|
||||
|
||||
/**
|
||||
* Maps Twitch user IDs to their badge index
|
||||
* Guarded by mutex_
|
||||
*/
|
||||
std::unordered_map<QString, int> badgeMap;
|
||||
|
||||
/**
|
||||
* Keeps a list of badges.
|
||||
* Indexes in here are referred to by badgeMap
|
||||
*/
|
||||
std::vector<EmotePtr> emotes;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue