aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-05 18:55:37 +0000
committerr <r@freesoftwareextremist.com>2020-01-05 18:55:37 +0000
commitca711e62ec85a763f1b17c9443125579a0f0be7a (patch)
tree869bc00d3acc7638f08e32ca7494c74a9841ef21 /templates
parent50e58c4e010959955286e4250ebacb3b93f8c525 (diff)
downloadbloat-ca711e62ec85a763f1b17c9443125579a0f0be7a.tar.gz
bloat-ca711e62ec85a763f1b17c9443125579a0f0be7a.zip
Fix duplicate status ids
Use retweeted_by_id to focus target tweet
Diffstat (limited to 'templates')
-rw-r--r--templates/status.tmpl14
1 files changed, 9 insertions, 5 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 1661f58..10b7d40 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -1,4 +1,4 @@
-<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
+<div id="status-{{.ID}}" class="status-container-container">
{{if .Reblog}}
<div class="retweet-info">
<a class="img-link" href="/user/{{.Account.ID}}">
@@ -102,11 +102,13 @@
{{else}}
{{if .Reblogged}}
<form class="status-retweet" action="/unretweet/{{.ID}}" method="post">
- <input type="image" src="/static/icons/retweeted.png" alt="undo retweet" class="icon" title="undo retweet">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
+ <input type="image" src="/static/icons/retweeted.png" alt="undo retweet" class="icon" title="undo retweet">
</form>
{{else}}
<form class="status-retweet" action="/retweet/{{.ID}}" method="post">
- <input type="image" src="/static/icons/retweet.png" alt="retweet" class="icon" title="retweet">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
+ <input type="image" src="/static/icons/retweet.png" alt="retweet" class="icon" title="retweet">
</form>
{{end}}
{{end}}
@@ -117,11 +119,13 @@
<div class="status-action">
{{if .Favourited}}
<form class="status-like" action="/unlike/{{.ID}}" method="post">
- <input type="image" src="/static/icons/liked.png" alt="unlike" class="icon" title="unlike">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
+ <input type="image" src="/static/icons/liked.png" alt="unlike" class="icon" title="unlike">
</form>
{{else}}
<form class="status-like" action="/like/{{.ID}}" method="post">
- <input type="image" src="/static/icons/star-o.png" alt="like" class="icon" title="like">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
+ <input type="image" src="/static/icons/star-o.png" alt="like" class="icon" title="like">
</form>
{{end}}
<a class="status-action-count" href="/likedby/{{.ID}}" title="click to see the the list">