Add some mini comments

This commit is contained in:
Rasmus Karlsson 2024-01-18 00:26:08 +01:00 committed by pajlada
parent 54da03a5bd
commit 2e4b10a737

View file

@ -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;
};