2018-10-13 11:08:57 +02:00
|
|
|
#pragma once
|
2018-10-09 19:43:29 +02:00
|
|
|
|
|
|
|
#include "common/Channel.hpp"
|
|
|
|
#include "widgets/helper/NotebookTab.hpp"
|
|
|
|
|
2021-11-13 13:07:29 +01:00
|
|
|
#include <QUuid>
|
2018-10-09 19:43:29 +02:00
|
|
|
#include <deque>
|
|
|
|
#include <mutex>
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class ClosedSplits
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct SplitInfo {
|
|
|
|
QString channelName;
|
2021-11-13 13:07:29 +01:00
|
|
|
QList<QUuid> filters;
|
2018-10-09 19:43:29 +02:00
|
|
|
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
|