diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-09-04 00:30:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-09-04 00:30:06 +0200 |
commit | dd4573e05cdfa2d9b99ef7a49c99e27c201da3e9 (patch) | |
tree | 6499b368a168b7a61c33b3588696c253ce5c9a34 /include | |
parent | 3f0421bea6b37d81d2d66c001b0fac2df91dd702 (diff) |
Matrix: fix messages that dont mention us being added to notifications list. Also fix read status for notifications
Diffstat (limited to 'include')
-rw-r--r-- | include/Body.hpp | 2 | ||||
-rw-r--r-- | include/BodyItem.hpp | 6 | ||||
-rw-r--r-- | include/QuickMedia.hpp | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/include/Body.hpp b/include/Body.hpp index e1e6fef..2a82406 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -71,6 +71,8 @@ namespace QuickMedia { void insert_item(std::shared_ptr<BodyItem> body_item, int index); void move_item(size_t src_index, size_t dst_index); // Returns the inserted position + size_t insert_item_by_timestamp_reverse(std::shared_ptr<BodyItem> body_item); + // Returns the inserted position size_t insert_item_by_timestamp(std::shared_ptr<BodyItem> body_item); // Note: keeps the selected item (moving the selected_item index if necessary) void insert_items_by_timestamps(BodyItems new_items); diff --git a/include/BodyItem.hpp b/include/BodyItem.hpp index 728c2b0..1d967b5 100644 --- a/include/BodyItem.hpp +++ b/include/BodyItem.hpp @@ -71,7 +71,7 @@ namespace QuickMedia { } // |new_timestamp| is in milliseconds - void set_timestamp(time_t new_timestamp) { + void set_timestamp(int64_t new_timestamp) { if(new_timestamp == timestamp) return; timestamp = new_timestamp; @@ -116,7 +116,7 @@ namespace QuickMedia { const std::string& get_description() const { return description; } const std::string& get_author() const { return author; } // In milliseconds - time_t get_timestamp() const { return timestamp; } + int64_t get_timestamp() const { return timestamp; } sf::Color get_title_color() const { return title_color; } sf::Color get_description_color() const { return description_color; } @@ -165,7 +165,7 @@ namespace QuickMedia { std::string title; std::string description; std::string author; - time_t timestamp; + int64_t timestamp; sf::Color title_color; sf::Color author_color; sf::Color description_color; diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index f3ac88b..dd54572 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -115,7 +115,7 @@ namespace QuickMedia { void page_loop_render(sf::RenderWindow &window, std::vector<Tab> &tabs, int selected_tab, TabAssociatedData &tab_associated_data, const Json::Value *json_chapters, Tabs &ui_tabs); using PageLoopSubmitHandler = std::function<void(const std::vector<Tab> &new_tabs)>; // Returns false if the page loop was escaped by user navigation (pressing escape) or if there was an error at startup - bool page_loop(std::vector<Tab> &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr); + bool page_loop(std::vector<Tab> &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr, bool go_to_previous_on_escape = true); void video_page_download_video(const std::string &url, sf::WindowHandle video_player_window = None); bool video_download_if_non_streamable(std::string &video_url, std::string &audio_url, bool &is_audio_only, bool &has_embedded_audio, PageType previous_page); void video_content_page(Page *parent_page, VideoPage *video_page, std::string video_title, bool download_if_streaming_fails, Body *parent_body, int play_index, int *parent_body_page = nullptr, const std::string &parent_page_search = ""); |