From 80b48b270ed66e3557b98d9fc8e82ad868bcde80 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 20 May 2021 22:33:32 +0200 Subject: Add notifications tab to matrix --- include/Body.hpp | 6 ++++-- include/SearchBar.hpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index 0b0fca4..e74d459 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -198,9 +198,9 @@ namespace QuickMedia { int get_index_by_body_item(BodyItem *body_item); void select_first_item(); - void select_last_item(); + void select_last_item(bool reset_prev_select = false); void clear_items(); - void prepend_items(BodyItems new_items); + void prepend_items_reverse(BodyItems new_items); void append_items(BodyItems new_items); void insert_item_by_timestamp(std::shared_ptr body_item); void insert_items_by_timestamps(BodyItems new_items); @@ -240,6 +240,8 @@ namespace QuickMedia { void set_page_scroll(float scroll); float get_page_scroll() const { return page_scroll; } + // This is the item we can see the start of + bool is_first_item_fully_visible() const { return first_item_fully_visible; } // This is the item we can see the end of bool is_last_item_fully_visible() const { return last_item_fully_visible; } bool is_body_full_with_items() const { return items_cut_off; } diff --git a/include/SearchBar.hpp b/include/SearchBar.hpp index 4fc19e9..027f534 100644 --- a/include/SearchBar.hpp +++ b/include/SearchBar.hpp @@ -40,6 +40,7 @@ namespace QuickMedia { float getBottomWithoutShadow() const; std::string get_text() const; + bool is_empty() const; TextUpdateCallback onTextUpdateCallback; TextSubmitCallback onTextSubmitCallback; -- cgit v1.2.3