mirror-chatterino2/src/widgets/splits/ClosedSplits.hpp
Mm2PL 1ca3dfde7f
Fixed splits losing filters when closing and reopening them (#3351)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-11-13 12:07:29 +00:00

35 lines
682 B
C++

#pragma once
#include "common/Channel.hpp"
#include "widgets/helper/NotebookTab.hpp"
#include <QUuid>
#include <deque>
#include <mutex>
#include <utility>
namespace chatterino {
class ClosedSplits
{
public:
struct SplitInfo {
QString channelName;
QList<QUuid> filters;
NotebookTab *tab; // non owning ptr
};
static void invalidateTab(NotebookTab *const tab);
static void push(const SplitInfo &si);
static void push(SplitInfo &&si);
static SplitInfo pop();
static bool empty();
static std::size_t size();
private:
static std::mutex m_;
static std::vector<SplitInfo> closedSplits_;
};
} // namespace chatterino