summaryrefslogtreecommitdiff
path: root/windows/threadswindow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'windows/threadswindow.hpp')
-rw-r--r--windows/threadswindow.hpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/windows/threadswindow.hpp b/windows/threadswindow.hpp
index a0c77e8..28d9c7f 100644
--- a/windows/threadswindow.hpp
+++ b/windows/threadswindow.hpp
@@ -4,7 +4,9 @@
class ActiveThreadsList : public Gtk::ScrolledWindow {
public:
- ActiveThreadsList(const ChannelData &channel);
+ ActiveThreadsList(const ChannelData &channel, const Gtk::ListBox::SlotFilter &filter);
+
+ void InvalidateFilter();
private:
Gtk::ListBox m_list;
@@ -18,7 +20,9 @@ public:
class ArchivedThreadsList : public Gtk::ScrolledWindow {
public:
- ArchivedThreadsList(const ChannelData &channel);
+ ArchivedThreadsList(const ChannelData &channel, const Gtk::ListBox::SlotFilter &filter);
+
+ void InvalidateFilter();
private:
Gtk::ListBox m_list;
@@ -38,11 +42,25 @@ public:
ThreadsWindow(const ChannelData &channel);
private:
+ // this filtering is rather cringe but idk what a better alternative would be
+ bool ListFilterFunc(Gtk::ListBoxRow *row_);
+
+ enum FilterMode {
+ FILTER_PUBLIC = 0,
+ FILTER_PRIVATE = 1,
+ };
+ bool m_filter_mode = FILTER_PUBLIC;
+
Snowflake m_channel_id;
Gtk::StackSwitcher m_switcher;
Gtk::Stack m_stack;
+ Gtk::RadioButtonGroup m_group;
+ Gtk::ButtonBox m_filter_buttons;
+ Gtk::RadioButton m_filter_public;
+ Gtk::RadioButton m_filter_private;
+
Gtk::Box m_box;
ActiveThreadsList m_active;
@@ -54,6 +72,7 @@ public:
ThreadListRow(const ChannelData &channel);
Snowflake ID;
+ ChannelType Type;
private:
Gtk::Label m_label;