aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-06-05 06:27:59 +0000
committerr <r@freesoftwareextremist.com>2020-06-05 06:28:50 +0000
commiteb3bc15da9617cf119d1c16365ec9e0c90a7549f (patch)
treea64778f95d8b1118e4158396b4d8d4b1ae10aaa7 /service
parentb5ca78a2e6efa8becc561639e8e9cdf0ab5797df (diff)
downloadbloat-eb3bc15da9617cf119d1c16365ec9e0c90a7549f.tar.gz
bloat-eb3bc15da9617cf119d1c16365ec9e0c90a7549f.zip
Show status numbers
Diffstat (limited to 'service')
-rw-r--r--service/service.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/service/service.go b/service/service.go
index 063624c..2c4f0b0 100644
--- a/service/service.go
+++ b/service/service.go
@@ -342,12 +342,16 @@ func (svc *service) ServeThreadPage(c *model.Client, id string, reply bool) (err
statuses := append(append(context.Ancestors, status), context.Descendants...)
replies := make(map[string][]mastodon.ReplyInfo)
+ idNumbers := make(map[string]int)
for i := range statuses {
statuses[i].ShowReplies = true
- statuses[i].ReplyMap = replies
- statuses[i].ReplyNumber = i
- addToReplyMap(replies, statuses[i].InReplyToID, statuses[i].ID, i+1)
+
+ statuses[i].IDNumbers = idNumbers
+ idNumbers[statuses[i].ID] = i + 1
+
+ statuses[i].IDReplies = replies
+ addToReplyMap(replies, statuses[i].InReplyToID, statuses[i].ID, i + 1)
}
commonData := svc.getCommonData(c, "post by "+status.Account.DisplayName)