aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-04 15:48:21 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-04 15:48:57 +0200
commit30d23a4fb9ad20bff7d7d31c914e9900b1bdf94c (patch)
tree6c4ad387ddfb182acc28268b0cc4648809850c03 /include
parentb64cb2c537d06d822a63f8139ca9bf2ffd80c21f (diff)
Matrix: sort messages by timestamp
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp5
1 files changed, 5 insertions, 0 deletions
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<BodyItem> body_item);
+ void insert_items_by_timestamps(BodyItems new_items);
void clear_thumbnails();
BodyItem* get_selected() const;