Skip to content

feat: introduce emote providers#6570

Open
Nerixyz wants to merge 14 commits intoChatterino:masterfrom
Nerixyz:refactor/emotes-1-of-4
Open

feat: introduce emote providers#6570
Nerixyz wants to merge 14 commits intoChatterino:masterfrom
Nerixyz:refactor/emotes-1-of-4

Conversation

@Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Nov 8, 2025

This is part 1/4 of refactoring emotes. It introduces the framework for emote providers but doesn't use it for any provider yet (except in tests). See https://github.com/Nerixyz/chatterino2/tree/refactor/third-party-emotes for all providers.

It introduces EmoteProviders. These are the services (BTTV/FFZ/7TV) that provide emotes. They are managed by the EmoteController. In a channel, the emotes are managed by ChannelEmotes.

The core idea hasn't changed since #6436 - this contains a more detailed explanation.

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with this approach & direction

using ChannelPtr = std::shared_ptr<Channel>;

/// An entry for a single provider
struct EmoteHolderItem {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the term "item" or "entry", at least not when it's this generic.
How about something like "provider handle"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a handle, because it's specific to a channel, and it's only stored in the holder (users of the class won't store this). I'll try to find something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to ProviderData since it's data for a provider in a channel.

Q_LOGGING_CATEGORY(chatterinoCrashhandler, "chatterino.crashhandler",
logThreshold);
Q_LOGGING_CATEGORY(chatterinoEmoji, "chatterino.emoji", logThreshold);
Q_LOGGING_CATEGORY(chatterinoEmotes, "chatterino.emotes", logThreshold);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random thought unrelated to your change here: It would be nice if emote providers would have their own logging category, and if that didn't require us to define something here

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incomplete review / questions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants