aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2024-04-21 15:34:07 +0000
committerr <r@freesoftwareextremist.com>2024-04-21 15:34:07 +0000
commitce1680dfd050990d8f3e484b92eb0db350bc3f2c (patch)
treeac1d27517473410310f744498fa428fe2f7fec00 /service
parentdf77ca02265aec9031871db0edf026d70156532e (diff)
downloadbloat-ce1680dfd050990d8f3e484b92eb0db350bc3f2c.tar.gz
bloat-ce1680dfd050990d8f3e484b92eb0db350bc3f2c.zip
Make refresh button point to the first page on timeline
Diffstat (limited to 'service')
-rw-r--r--service/service.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/service/service.go b/service/service.go
index 4122f14..32912f6 100644
--- a/service/service.go
+++ b/service/service.go
@@ -131,6 +131,7 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID,
MinID: minID,
Limit: 20,
}
+ var refreshLink = "/timeline/" + tType
switch tType {
default:
@@ -159,6 +160,7 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID,
if err != nil {
return err
}
+ refreshLink += "?instance=" + instance
}
title = "Remote Timeline"
case "twkn":
@@ -177,6 +179,7 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID,
return err
}
title = "List Timeline - " + list.Title
+ refreshLink += "?list=" + listId
}
for i := range statuses {
@@ -211,13 +214,14 @@ func (s *service) TimelinePage(c *client, tType, instance, listId, maxID,
cdata := s.cdata(c, title, 0, 0, "")
data := &renderer.TimelineData{
- Title: title,
- Type: tType,
- Instance: instance,
- Statuses: statuses,
- NextLink: nextLink,
- PrevLink: prevLink,
- CommonData: cdata,
+ Title: title,
+ Type: tType,
+ Instance: instance,
+ Statuses: statuses,
+ NextLink: nextLink,
+ PrevLink: prevLink,
+ RefreshLink: refreshLink,
+ CommonData: cdata,
}
return s.renderer.Render(c.rctx, c.w, renderer.TimelinePage, data)
}