mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix crash when closing and quickly opening a split, then running /clearmessages
(#3852)
This commit is contained in:
parent
e1b512a373
commit
965b06677a
|
@ -23,6 +23,7 @@
|
||||||
- Minor: Added `/copy` command. Usage: `/copy <text>`. Copies provided text to clipboard - can be useful with custom commands. (#3763)
|
- Minor: Added `/copy` command. Usage: `/copy <text>`. Copies provided text to clipboard - can be useful with custom commands. (#3763)
|
||||||
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
|
- Minor: Removed total views from the usercard, as Twitch no longer updates the number. (#3792)
|
||||||
- Minor: Add Quick Switcher item to open a channel in a new popup window. (#3828)
|
- Minor: Add Quick Switcher item to open a channel in a new popup window. (#3828)
|
||||||
|
- Bugfix: Fix crash that can occur when closing and quickly reopening a split, then running a command. (#3852)
|
||||||
- Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
|
- Bugfix: Connection to Twitch PubSub now recovers more reliably. (#3643, #3716)
|
||||||
- Bugfix: Fix crash that can occur when changing channels. (#3799)
|
- Bugfix: Fix crash that can occur when changing channels. (#3799)
|
||||||
- Bugfix: Fixed viewers list search not working when used before loading finishes. (#3774)
|
- Bugfix: Fixed viewers list search not working when used before loading finishes. (#3774)
|
||||||
|
|
|
@ -932,7 +932,11 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||||
auto *currentPage = dynamic_cast<SplitContainer *>(
|
auto *currentPage = dynamic_cast<SplitContainer *>(
|
||||||
getApp()->windows->getMainWindow().getNotebook().getSelectedPage());
|
getApp()->windows->getMainWindow().getNotebook().getSelectedPage());
|
||||||
|
|
||||||
currentPage->getSelectedSplit()->getChannelView().clearMessages();
|
if (auto split = currentPage->getSelectedSplit())
|
||||||
|
{
|
||||||
|
split->getChannelView().clearMessages();
|
||||||
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -408,12 +408,13 @@ void Window::addShortcuts()
|
||||||
{
|
{
|
||||||
splitContainer = this->notebook_->getOrAddSelectedPage();
|
splitContainer = this->notebook_->getOrAddSelectedPage();
|
||||||
}
|
}
|
||||||
this->notebook_->select(splitContainer);
|
|
||||||
Split *split = new Split(splitContainer);
|
Split *split = new Split(splitContainer);
|
||||||
split->setChannel(
|
split->setChannel(
|
||||||
getApp()->twitch->getOrAddChannel(si.channelName));
|
getApp()->twitch->getOrAddChannel(si.channelName));
|
||||||
split->setFilters(si.filters);
|
split->setFilters(si.filters);
|
||||||
splitContainer->appendSplit(split);
|
splitContainer->appendSplit(split);
|
||||||
|
splitContainer->setSelected(split);
|
||||||
|
this->notebook_->select(splitContainer);
|
||||||
return "";
|
return "";
|
||||||
}},
|
}},
|
||||||
{"toggleLocalR9K",
|
{"toggleLocalR9K",
|
||||||
|
|
Loading…
Reference in a new issue