diff --git a/mastodon/status.go b/mastodon/status.go index b4f57ae..7a29b99 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -52,8 +52,8 @@ type Status struct { // Custom fields Pleroma StatusPleroma `json:"pleroma"` ShowReplies bool `json:"show_replies"` - ReplyMap map[string][]ReplyInfo `json:"reply_map"` - ReplyNumber int `json:"reply_number"` + IDReplies map[string][]ReplyInfo `json:"id_replies"` + IDNumbers map[string]int `json:"id_numbers"` RetweetedByID string `json:"retweeted_by_id"` } 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) diff --git a/static/style.css b/static/style.css index 8410c77..f7f9ab6 100644 --- a/static/style.css +++ b/static/style.css @@ -438,6 +438,7 @@ img.emoji { background-color: #ffffff; padding: 2px 4px; border: 1px solid #aaaaaa; + right: 0; } .more-container:hover .more-content { diff --git a/templates/status.tmpl b/templates/status.tmpl index 18e6d9a..ec0d297 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -26,7 +26,7 @@