From 87e8e16d35eb84574a6999304f6175c7616d183e Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 20 Mar 2018 19:18:30 +0100 Subject: [PATCH] Simpler notification filters --- pages/settings/settings.pixy | 20 +++++++++---------- .../reset-notification-settings.go | 8 +++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pages/settings/settings.pixy b/pages/settings/settings.pixy index 9390eb50..8d3de3ad 100644 --- a/pages/settings/settings.pixy +++ b/pages/settings/settings.pixy @@ -115,21 +115,21 @@ component SettingsNotifications(user *arn.User) .widget.mountable(data-api="/api/settings/" + user.ID) h3.widget-title Icon("filter") - span General + span Filter InputBool("Notification.AnimeEpisodeReleases", user.Settings().Notification.AnimeEpisodeReleases, "New episodes", "Notifications about new episodes") InputBool("Notification.AnimeFinished", user.Settings().Notification.AnimeFinished, "Finished anime series", "Notifications about finished anime series") - InputBool("Notification.NewFollowers", user.Settings().Notification.NewFollowers, "New followers", "Notifications about new followers") + //- InputBool("Notification.NewFollowers", user.Settings().Notification.NewFollowers, "New followers", "Notifications about new followers") - .widget.mountable(data-api="/api/settings/" + user.ID) - h3.widget-title - Icon("heart") - span Likes + //- .widget.mountable(data-api="/api/settings/" + user.ID) + //- h3.widget-title + //- Icon("heart") + //- span Likes - InputBool("Notification.ForumLikes", user.Settings().Notification.ForumLikes, "Forum post likes", "Notifications about forum post likes") - InputBool("Notification.SoundTrackLikes", user.Settings().Notification.SoundTrackLikes, "Soundtrack likes", "Notifications about soundtrack likes") - //- InputBool("Notification.GroupPostLikes", user.Settings().Notification.GroupPostLikes, "Group post likes", "Notifications about group post likes") - InputBool("Notification.QuoteLikes", user.Settings().Notification.QuoteLikes, "Quote likes", "Notifications about quote likes") + //- InputBool("Notification.ForumLikes", user.Settings().Notification.ForumLikes, "Forum post likes", "Notifications about forum post likes") + //- InputBool("Notification.SoundTrackLikes", user.Settings().Notification.SoundTrackLikes, "Soundtrack likes", "Notifications about soundtrack likes") + //- //- InputBool("Notification.GroupPostLikes", user.Settings().Notification.GroupPostLikes, "Group post likes", "Notifications about group post likes") + //- InputBool("Notification.QuoteLikes", user.Settings().Notification.QuoteLikes, "Quote likes", "Notifications about quote likes") component SettingsApps(user *arn.User) SettingsTabs diff --git a/patches/reset-notification-settings/reset-notification-settings.go b/patches/reset-notification-settings/reset-notification-settings.go index b9679445..d40210d2 100644 --- a/patches/reset-notification-settings/reset-notification-settings.go +++ b/patches/reset-notification-settings/reset-notification-settings.go @@ -7,7 +7,13 @@ func main() { for user := range arn.StreamUsers() { settings := user.Settings() - settings.Notification = arn.DefaultNotificationSettings() + defaultSettings := arn.DefaultNotificationSettings() + + settings.Notification.QuoteLikes = defaultSettings.QuoteLikes + settings.Notification.SoundTrackLikes = defaultSettings.SoundTrackLikes + settings.Notification.GroupPostLikes = defaultSettings.GroupPostLikes + settings.Notification.ForumLikes = defaultSettings.ForumLikes + settings.Notification.NewFollowers = defaultSettings.NewFollowers settings.Save() } }