From 6ae1a5e8ad4753d90b5adc11fb49216f8bf2b8e1 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 23 Jan 2021 00:49:14 +0100 Subject: Persist hidden tags --- src/UserSettingsPage.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/UserSettingsPage.cpp') diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index f90938c9..0e3bd667 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -81,6 +81,7 @@ UserSettings::load(std::optional 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_ = @@ -184,6 +185,13 @@ UserSettings::setGroupView(bool state) save(); } +void +UserSettings::setHiddenTags(QStringList hiddenTags) +{ + hiddenTags_ = hiddenTags; + save(); +} + void UserSettings::setMarkdown(bool state) { @@ -538,6 +546,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_); -- cgit 1.4.1