From 30d23a4fb9ad20bff7d7d31c914e9900b1bdf94c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Oct 2020 15:48:21 +0200 Subject: Matrix: sort messages by timestamp --- include/Body.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index 5ee93fc..3d5c870 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -114,6 +114,9 @@ namespace QuickMedia { // Select next item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the bottom was hit when wrap_around is set to false bool select_next_item(); void set_selected_item(int item); + + // Returns -1 if item can't be found + int get_index_by_body_item(BodyItem *body_item); void select_first_item(); void select_last_item(); @@ -121,6 +124,8 @@ namespace QuickMedia { void clear_items(); void prepend_items(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); void clear_thumbnails(); BodyItem* get_selected() const; -- cgit v1.2.3