aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp12
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;
};