From c3d90539e9a7addd3c41f44b864b14bde60958dc Mon Sep 17 00:00:00 2001 From: r Date: Sat, 14 Nov 2020 14:08:16 +0000 Subject: Add notification interval setting It replaces the "Auto refresh notifications" checkbox --- service/transport.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'service/transport.go') diff --git a/service/transport.go b/service/transport.go index 6c0975d..3c9392a 100644 --- a/service/transport.go +++ b/service/transport.go @@ -589,22 +589,22 @@ func NewHandler(s Service, staticDir string) http.Handler { threadInNewTab := req.FormValue("thread_in_new_tab") == "true" hideAttachments := req.FormValue("hide_attachments") == "true" maskNSFW := req.FormValue("mask_nsfw") == "true" - arn := req.FormValue("auto_refresh_notifications") == "true" + ni, _ := strconv.Atoi(req.FormValue("notification_interval")) fluorideMode := req.FormValue("fluoride_mode") == "true" darkMode := req.FormValue("dark_mode") == "true" antiDopamineMode := req.FormValue("anti_dopamine_mode") == "true" settings := &model.Settings{ - DefaultVisibility: visibility, - DefaultFormat: format, - CopyScope: copyScope, - ThreadInNewTab: threadInNewTab, - HideAttachments: hideAttachments, - MaskNSFW: maskNSFW, - AutoRefreshNotifications: arn, - FluorideMode: fluorideMode, - DarkMode: darkMode, - AntiDopamineMode: antiDopamineMode, + DefaultVisibility: visibility, + DefaultFormat: format, + CopyScope: copyScope, + ThreadInNewTab: threadInNewTab, + HideAttachments: hideAttachments, + MaskNSFW: maskNSFW, + NotificationInterval: ni, + FluorideMode: fluorideMode, + DarkMode: darkMode, + AntiDopamineMode: antiDopamineMode, } err := s.SaveSettings(c, settings) -- cgit v1.2.3