diff options
author | r <r@freesoftwareextremist.com> | 2020-10-19 06:51:23 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2020-10-19 06:51:23 +0000 |
commit | fdd9b8fd2bf1688187dda2cb801232c744fe26e0 (patch) | |
tree | f729fa705e254644fc188639e6dbf55d769df4f6 /service/service.go | |
parent | ef41ff32e2cb16a3757b952a33d29528482685b8 (diff) | |
download | bloat-fdd9b8fd2bf1688187dda2cb801232c744fe26e0.tar.gz bloat-fdd9b8fd2bf1688187dda2cb801232c744fe26e0.zip |
Add setting for default format
Diffstat (limited to 'service/service.go')
-rw-r--r-- | service/service.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/service/service.go b/service/service.go index 447f186..23685c4 100644 --- a/service/service.go +++ b/service/service.go @@ -4,8 +4,8 @@ import ( "context" "errors" "fmt" - "mime/multipart" "html/template" + "mime/multipart" "net/url" "strings" @@ -198,6 +198,7 @@ func (svc *service) ServeNavPage(c *model.Client) (err error) { postContext := model.PostContext{ DefaultVisibility: c.Session.Settings.DefaultVisibility, + DefaultFormat: c.Session.Settings.DefaultFormat, Formats: svc.postFormats, } @@ -326,6 +327,7 @@ func (svc *service) ServeThreadPage(c *model.Client, id string, reply bool) (err postContext = model.PostContext{ DefaultVisibility: visibility, + DefaultFormat: c.Session.Settings.DefaultFormat, Formats: svc.postFormats, ReplyContext: &model.ReplyContext{ InReplyToID: id, @@ -686,8 +688,9 @@ func (svc *service) ServeSearchPage(c *model.Client, func (svc *service) ServeSettingsPage(c *model.Client) (err error) { commonData := svc.getCommonData(c, "settings") data := &renderer.SettingsData{ - CommonData: commonData, - Settings: &c.Session.Settings, + CommonData: commonData, + Settings: &c.Session.Settings, + PostFormats: svc.postFormats, } rCtx := getRendererContext(c) |