aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-04-25 09:35:18 +0000
committerr <r@freesoftwareextremist.com>2020-04-25 09:35:18 +0000
commitf380371654dd81b258e5f37e50ffcf3764f117c1 (patch)
treeedfa323e84ea3264a7a0cf7ba4a3ee58895cbcf0 /service
parent1e750f89b156c601fa5cfbda21e8c4b46be85b18 (diff)
downloadbloat-f380371654dd81b258e5f37e50ffcf3764f117c1.tar.gz
bloat-f380371654dd81b258e5f37e50ffcf3764f117c1.zip
Add option to hide attachments
Diffstat (limited to 'service')
-rw-r--r--service/service.go13
-rw-r--r--service/transport.go2
2 files changed, 9 insertions, 6 deletions
diff --git a/service/service.go b/service/service.go
index 02c55cb..d6ff192 100644
--- a/service/service.go
+++ b/service/service.go
@@ -107,12 +107,13 @@ func getRendererContext(c *model.Client) *renderer.Context {
settings = *model.NewSettings()
}
return &renderer.Context{
- MaskNSFW: settings.MaskNSFW,
- ThreadInNewTab: settings.ThreadInNewTab,
- FluorideMode: settings.FluorideMode,
- DarkMode: settings.DarkMode,
- CSRFToken: session.CSRFToken,
- UserID: session.UserID,
+ HideAttachments: settings.HideAttachments,
+ MaskNSFW: settings.MaskNSFW,
+ ThreadInNewTab: settings.ThreadInNewTab,
+ FluorideMode: settings.FluorideMode,
+ DarkMode: settings.DarkMode,
+ CSRFToken: session.CSRFToken,
+ UserID: session.UserID,
}
}
diff --git a/service/transport.go b/service/transport.go
index f52cca0..840f4cc 100644
--- a/service/transport.go
+++ b/service/transport.go
@@ -615,6 +615,7 @@ func NewHandler(s Service, staticDir string) http.Handler {
visibility := req.FormValue("visibility")
copyScope := req.FormValue("copy_scope") == "true"
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"
fluorideMode := req.FormValue("fluoride_mode") == "true"
@@ -624,6 +625,7 @@ func NewHandler(s Service, staticDir string) http.Handler {
DefaultVisibility: visibility,
CopyScope: copyScope,
ThreadInNewTab: threadInNewTab,
+ HideAttachments: hideAttachments,
MaskNSFW: maskNSFW,
AutoRefreshNotifications: arn,
FluorideMode: fluorideMode,