aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 79bece6..4987735 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -17,6 +17,8 @@ namespace QuickMedia {
BodyItem(const BodyItem &other);
void set_title(std::string new_title) {
+ if(title.empty() && new_title.empty())
+ return;
title = std::move(new_title);
dirty = true;
}
@@ -27,6 +29,8 @@ namespace QuickMedia {
}
void set_description(std::string new_description) {
+ if(description.empty() && new_description.empty())
+ return;
description = std::move(new_description);
dirty_description = true;
}
@@ -36,8 +40,10 @@ namespace QuickMedia {
dirty_description = true;
}
- void set_author(std::string str) {
- author = std::move(str);
+ void set_author(std::string new_author) {
+ if(author.empty() && new_author.empty())
+ return;
+ author = std::move(new_author);
dirty_author = true;
}
@@ -61,6 +67,7 @@ namespace QuickMedia {
std::vector<size_t> replies;
std::string post_number;
sf::Color title_color;
+ sf::Color author_color;
private:
std::string title;
std::string description;