Removed liveStatusChanged signal connection to fix a crash (#2377)

This commit is contained in:
Paweł 2021-01-18 15:11:50 +01:00 committed by GitHub
parent 766700adc8
commit a9b1af60de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 13 deletions

View file

@ -2,7 +2,7 @@
## Unversioned
- Major: Added clip creation support. You can create clips with `/clip` command, `Alt+X` keybind or `Create a clip` option in split header's context menu. This requires a new authentication scope so re-authentication will be required to use it. (#2271)
- Major: Added clip creation support. You can create clips with `/clip` command, `Alt+X` keybind or `Create a clip` option in split header's context menu. This requires a new authentication scope so re-authentication will be required to use it. (#2271, #2377)
- Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200)
- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001, #2316, #2342)
- Major: Color mentions to match the mentioned users. You can disable this by unchecking "Color @usernames" under `Settings -> General -> Advanced (misc.)`. (#1963, #2284)

View file

@ -378,24 +378,20 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
&Split::openWithCustomScheme);
}
auto clipButton = menu->addAction(
"Create a clip", this->split_,
[twitchChannel] {
twitchChannel->createClip();
},
QKeySequence("Alt+X"));
clipButton->setVisible(this->split_->getChannel()->isLive());
this->managedConnect(
twitchChannel->liveStatusChanged, [this, clipButton] {
clipButton->setVisible(this->split_->getChannel()->isLive());
});
if (this->split_->getChannel()->hasModRights())
{
menu->addAction(OPEN_MOD_VIEW_IN_BROWSER, this->split_,
&Split::openModViewInBrowser);
}
menu->addAction(
"Create a clip", this->split_,
[twitchChannel] {
twitchChannel->createClip();
},
QKeySequence("Alt+X"))
->setVisible(twitchChannel->isLive());
menu->addSeparator();
}