diff --git a/src/widgets/helper/splitheader.cpp b/src/widgets/helper/splitheader.cpp index e4f9dc0e..f6786302 100644 --- a/src/widgets/helper/splitheader.cpp +++ b/src/widgets/helper/splitheader.cpp @@ -136,9 +136,9 @@ void SplitHeader::initializeChannelSignals() TwitchChannel *twitchChannel = dynamic_cast(channel.get()); if (twitchChannel) { - twitchChannel->updateLiveInfo.connect([this]() { + this->managedConnections.emplace_back(twitchChannel->updateLiveInfo.connect([this]() { this->updateChannelText(); // - }); + })); } } diff --git a/src/widgets/helper/splitheader.hpp b/src/widgets/helper/splitheader.hpp index 80d81ab5..e4095eae 100644 --- a/src/widgets/helper/splitheader.hpp +++ b/src/widgets/helper/splitheader.hpp @@ -14,6 +14,9 @@ #include #include #include +#include + +#include namespace chatterino { namespace widgets { @@ -64,6 +67,8 @@ private: QString tooltip; bool isLive; + std::vector managedConnections; + public slots: void addDropdownItems(RippleEffectButton *label);