From e924503f2d135208519ddad2e95adeff90d78bda Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Wed, 14 Dec 2022 02:56:26 +0300 Subject: [PATCH] Tagged timeline improvments and visible now --- service/service.go | 14 +++++++++++--- templates/nav.tmpl | 1 + templates/timeline.tmpl | 10 ++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/service/service.go b/service/service.go index 4343928..c284597 100644 --- a/service/service.go +++ b/service/service.go @@ -162,9 +162,11 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID, } title = "The Whole Known Network" case "tag": - statuses, err = c.GetTimelineHashtag(c.ctx, tag, false, &pg) - if err != nil { - return err + if len(tag) > 0 { + statuses, err = c.GetTimelineHashtag(c.ctx, tag, false, &pg) + if err != nil { + return err + } } title = "Tag timeline" @@ -203,6 +205,9 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID, if len(instance) > 0 { v.Set("instance", instance) } + if len(tag) > 0 { + v.Set("tag", tag) + } if len(listId) > 0 { v.Set("list", listId) } @@ -215,6 +220,9 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID, if len(instance) > 0 { v.Set("instance", instance) } + if len(tag) > 0 { + v.Set("tag", tag) + } if len(listId) > 0 { v.Set("list", listId) } diff --git a/templates/nav.tmpl b/templates/nav.tmpl index e1e120f..492359a 100644 --- a/templates/nav.tmpl +++ b/templates/nav.tmpl @@ -22,6 +22,7 @@ search
+ tag lists settings
diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index 38659dc..1145b7a 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -14,6 +14,16 @@
{{end}} +{{if eq .Type "tag"}} +
+ + + + + +
+{{end}} + {{range .Statuses}} {{template "status.tmpl" (WithContext . $.Ctx)}}