Fixed splits losing filters when closing and reopening them (#3351)

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL 2021-11-13 12:07:29 +00:00 committed by GitHub
parent 6b3a420e42
commit 1ca3dfde7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 1 deletions

View file

@ -51,6 +51,7 @@
- Bugfix: Fixed the reconnection backoff accidentally resetting when thrown out of certain IRC servers. (#3328)
- Bugfix: Fixed underlying text from disabled emotes not being colorized properly. (#3333)
- Bugfix: Fixed IRC ACTION messages (/me) not being colorized properly. (#3341)
- Bugfix: Fixed splits losing filters when closing and reopening them (#3351)
- Bugfix: Fixed the first usercard being broken in `/mods` and `/vips` (#3349)
- Dev: Add GitHub action to test builds without precompiled headers enabled. (#3327)
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)

View file

@ -399,6 +399,7 @@ void Window::addShortcuts()
Split *split = new Split(splitContainer);
split->setChannel(
getApp()->twitch.server->getOrAddChannel(si.channelName));
split->setFilters(si.filters);
splitContainer->appendSplit(split);
});

View file

@ -3,6 +3,7 @@
#include "common/Channel.hpp"
#include "widgets/helper/NotebookTab.hpp"
#include <QUuid>
#include <deque>
#include <mutex>
#include <utility>
@ -14,6 +15,7 @@ class ClosedSplits
public:
struct SplitInfo {
QString channelName;
QList<QUuid> filters;
NotebookTab *tab; // non owning ptr
};

View file

@ -255,7 +255,8 @@ void SplitContainer::addSplit(Split *split)
tab->connect(tab, &QWidget::destroyed, [tab]() mutable {
ClosedSplits::invalidateTab(tab);
});
ClosedSplits::push({split->getChannel()->getName(), tab});
ClosedSplits::push({split->getChannel()->getName(),
split->getFilters(), tab});
}
break;