aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index bf5f6aa..5ee93fc 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -56,9 +56,17 @@ namespace QuickMedia {
dirty_author = true;
}
+ void set_timestamp(time_t new_timestamp) {
+ if(timestamp == 0 && new_timestamp == 0)
+ return;
+ timestamp = new_timestamp;
+ dirty_timestamp = true;
+ }
+
const std::string& get_title() const { return title; }
const std::string& get_description() const { return description; }
const std::string& get_author() const { return author; }
+ time_t get_timestamp() const { return timestamp; }
// TODO: Use a list of strings instead, not all plugins need all of these fields
std::string url;
@@ -68,10 +76,12 @@ namespace QuickMedia {
bool dirty;
bool dirty_description;
bool dirty_author;
+ bool dirty_timestamp;
bool thumbnail_is_local;
std::unique_ptr<Text> title_text;
std::unique_ptr<Text> description_text;
std::unique_ptr<Text> author_text;
+ std::unique_ptr<sf::Text> timestamp_text;
// Used by image boards for example. The elements are indices to other body items
std::vector<size_t> replies;
std::string post_number;
@@ -83,6 +93,7 @@ namespace QuickMedia {
std::string title;
std::string description;
std::string author;
+ time_t timestamp;
};
using BodyItems = std::vector<std::shared_ptr<BodyItem>>;