Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
1.97k stars 442 forks source link

chore: refactor TwitchIrcServer #5421

Closed pajlada closed 1 month ago

pajlada commented 1 month ago

This PR aims to remove all direct uses of getApp()->twitch, ensuring we can add tests for anything adjacent to TwitchIrcServer

The class and its inheritance is ugly, so this refactor PR is also pretty ugly. To achieve the goal of this PR without making too many changes, I've added getTwitchAbstract() alongside getTwitch() which returns the IAbstractIrcServer of the TwitchIrcServer.

pajlada commented 1 month ago

image

Small testing shows everything works as expected - I've done a full self-review, ensuring I haven't c-v-pasted anything incorrectly.