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 /src/Body.cpp | |
parent | 8e79b2e10827f42d76ec61621f2c484f9cdc2551 (diff) |
Move chat page room list logic to matrix delegate
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index d51ea29..72974fa 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -487,10 +487,10 @@ namespace QuickMedia { // TODO: Use a render target for the whole body so all images can be put into one. // TODO: Load thumbnails with more than one thread. void Body::draw(sf::RenderWindow &window, sf::Vector2f pos, sf::Vector2f size, const Json::Value &content_progress) { - if(items_dirty) { - items_dirty = false; - if(using_filter) + if(items_dirty != DirtyState::FALSE) { + if(using_filter || items_dirty == DirtyState::FORCE_TRUE) filter_search_fuzzy(current_filter, false); + items_dirty = DirtyState::FALSE; } sf::Vector2f scissor_pos = pos; @@ -1547,7 +1547,11 @@ namespace QuickMedia { clamp_selected_item_to_body_count = 1; } - void Body::items_set_dirty() { - items_dirty = true; + void Body::items_set_dirty(bool force) { + items_dirty = force ? DirtyState::FORCE_TRUE : DirtyState::TRUE; + } + + void Body::apply_search_filter_for_item(BodyItem *body_item) { + filter_search_fuzzy_item(current_filter, body_item); } } |