From 0df442e04c57dd80fc9a6b885b2ba86442b405b9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 12 Nov 2020 02:35:19 +0100 Subject: Matrix: workaround synapse bug where sync doesn't include membership states when using messages filter --- include/Body.hpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include') 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 create(std::string title) { return std::make_shared(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; } -- cgit v1.2.3