aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-12 02:35:19 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-12 02:35:19 +0100
commit0df442e04c57dd80fc9a6b885b2ba86442b405b9 (patch)
tree853e0ea71330cb2939e4b0ec7a16515f4169c5a7 /include
parent01636191bc8ee0a109a50ca9441f01a14d273a02 (diff)
Matrix: workaround synapse bug where sync doesn't include membership states when using messages filter
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 1952b74..f4742bc 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -39,21 +39,21 @@ namespace QuickMedia {
static std::shared_ptr<BodyItem> create(std::string title) { return std::make_shared<BodyItem>(std::move(title)); }
void set_title(std::string new_title) {
- if(title.empty() && new_title.empty())
+ if(title == new_title)
return;
title = std::move(new_title);
dirty = true;
}
void set_description(std::string new_description) {
- if(description.empty() && new_description.empty())
+ if(description == new_description)
return;
description = std::move(new_description);
dirty_description = true;
}
void set_author(std::string new_author) {
- if(author.empty() && new_author.empty())
+ if(author == new_author)
return;
author = std::move(new_author);
dirty_author = true;
@@ -68,24 +68,24 @@ namespace QuickMedia {
}
void set_title_color(sf::Color new_color) {
- if(new_color != title_color) {
- title_color = new_color;
- dirty = true;
- }
+ if(new_color == title_color)
+ return;
+ title_color = new_color;
+ dirty = true;
}
void set_description_color(sf::Color new_color) {
- if(new_color != description_color) {
- description_color = new_color;
- dirty_description = true;
- }
+ if(new_color == description_color)
+ return;
+ description_color = new_color;
+ dirty_description = true;
}
void set_author_color(sf::Color new_color) {
- if(new_color != author_color) {
- author_color = new_color;
- dirty_author = true;
- }
+ if(new_color == author_color)
+ return;
+ author_color = new_color;
+ dirty_author = true;
}
const std::string& get_title() const { return title; }