diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-05-20 05:20:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-05-20 05:34:59 +0200 |
commit | 3609429b3d8fccd99994dde015b6516376e6835b (patch) | |
tree | 2155b1f3f60897a21ca29dbdf150b8ba6bb95376 /include | |
parent | 8e79b2e10827f42d76ec61621f2c484f9cdc2551 (diff) |
Move chat page room list logic to matrix delegate
Diffstat (limited to 'include')
-rw-r--r-- | include/Body.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index 8e571f1..0b0fca4 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -246,7 +246,9 @@ namespace QuickMedia { int get_num_visible_items() const { return num_visible_items; }; // Call this once after adding new items - void items_set_dirty(); + void items_set_dirty(bool force = false); + + void apply_search_filter_for_item(BodyItem *body_item); sf::Text progress_text; sf::Text replies_text; @@ -279,6 +281,12 @@ namespace QuickMedia { float get_offset_to_first_visible_item(sf::Vector2f body_size); float get_offset_to_last_visible_item(sf::Vector2f body_size); private: + enum class DirtyState { + FALSE, + TRUE, + FORCE_TRUE + }; + Program *program; int selected_item; int prev_selected_item; @@ -329,7 +337,7 @@ namespace QuickMedia { float item_background_target_pos_y = 0.0f; float item_background_target_height = 0.0f; // TODO: Instead of using this, add functions for modifying |items| and apply the filter on those new items - bool items_dirty = false; + DirtyState items_dirty = DirtyState::FALSE; std::string current_filter; bool using_filter = false; }; |