Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor 7TV EventAPI #4342

Merged
merged 11 commits into from
Feb 4, 2023
Merged

Refactor 7TV EventAPI #4342

merged 11 commits into from
Feb 4, 2023

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Jan 30, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

This PR refactors the 7TV EventAPI implementation to be easier to extend. Specifically, to make it easier to add new conditions.

The commits can be reviewed on their own.

Changes

  1. Remove prefix of EventAPI files (SeventvEventAPI-).
  2. Put types into their own namespace. This makes it easier to read the types, since they don't need their own prefix anymore.
  3. Support conditions other than object_id by using a std::variant.
  4. Ignore ack in debug messages, and remove double space.
  5. Move the destroyed handler to the destructor (see Crashes all throughout the application when destroying channel objects on macOS #4347).
  6. Fix a clang-tidy warning.

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

src/providers/seventv/SeventvEmotes.cpp Show resolved Hide resolved
src/providers/seventv/SeventvEventAPI.cpp Show resolved Hide resolved
src/providers/seventv/SeventvEventAPI.cpp Show resolved Hide resolved
src/providers/seventv/eventapi/Subscription.hpp Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/providers/seventv/SeventvEmotes.hpp Outdated Show resolved Hide resolved
src/providers/seventv/SeventvEventAPI.cpp Show resolved Hide resolved
src/providers/seventv/SeventvEventAPI.hpp Outdated Show resolved Hide resolved
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

src/providers/seventv/SeventvEmotes.cpp Show resolved Hide resolved
src/providers/seventv/SeventvEventAPI.cpp Show resolved Hide resolved
@pajlada pajlada merged commit 0c74ab1 into Chatterino:master Feb 4, 2023
@Nerixyz Nerixyz deleted the refactor/eventapi branch February 4, 2023 13:01
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.

None yet

2 participants