summary refs log tree commit diff
path: root/src/UserSettingsPage.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:42:38 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-02-01 18:42:38 -0500
commit53c653a228f529bab3753ca99dee18a5bf5342a2 (patch)
treead0ba40d27ca5a515f1f33c29c910e5cf7b20dd7 /src/UserSettingsPage.cpp
parentRemove redundant import and fix visible warning (diff)
parentFix emojis with fe0f in the middle (diff)
downloadnheko-53c653a228f529bab3753ca99dee18a5bf5342a2.tar.xz
Merge remote-tracking branch 'nheko-im/master' into privacy_screen
Diffstat (limited to 'src/UserSettingsPage.cpp')
-rw-r--r--src/UserSettingsPage.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index c26bf2e9..61b04074 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -81,6 +81,7 @@ UserSettings::load(std::optional<QString> profile)
         hasAlertOnNotification_  = settings.value("user/alert_on_notification", false).toBool();
         startInTray_             = settings.value("user/window/start_in_tray", false).toBool();
         groupView_               = settings.value("user/group_view", true).toBool();
+        hiddenTags_              = settings.value("user/hidden_tags", QStringList{}).toStringList();
         buttonsInTimeline_       = settings.value("user/timeline/buttons", true).toBool();
         timelineMaxWidth_        = settings.value("user/timeline/max_width", 0).toInt();
         messageHoverHighlight_ =
@@ -187,6 +188,13 @@ UserSettings::setGroupView(bool state)
 }
 
 void
+UserSettings::setHiddenTags(QStringList hiddenTags)
+{
+        hiddenTags_ = hiddenTags;
+        save();
+}
+
+void
 UserSettings::setMarkdown(bool state)
 {
         if (state == markdown_)
@@ -564,6 +572,7 @@ UserSettings::save()
         settings.setValue("minor_events", sortByImportance_);
         settings.setValue("read_receipts", readReceipts_);
         settings.setValue("group_view", groupView_);
+        settings.setValue("hidden_tags", hiddenTags_);
         settings.setValue("markdown_enabled", markdown_);
         settings.setValue("desktop_notifications", hasDesktopNotifications_);
         settings.setValue("alert_on_notification", hasAlertOnNotification_);