Showrepeat variable

master
Bob Mottram 2019-08-25 19:08:25 +01:00
parent 8cd6e1215f
commit 963e972f7d
2 changed files with 6 additions and 5 deletions

View File

@ -406,7 +406,7 @@ a:link {
.container img.DMicon { .container img.DMicon {
float: none; float: none;
width: 60px; width: 40px;
margin: 0 0; margin: 0 0;
padding: 0 0; padding: 0 0;
border-radius: 0; border-radius: 0;

View File

@ -1093,10 +1093,11 @@ def individualPostAsHtml(baseDir: str, \
""" Shows a single post as html """ Shows a single post as html
""" """
# If this is the inbox timeline then don't show the repeat icon on any DMs # If this is the inbox timeline then don't show the repeat icon on any DMs
showRepeatIcon=showRepeats
showDMicon=False showDMicon=False
if showRepeats: if showRepeats:
if isDM(postJsonObject): if isDM(postJsonObject):
showRepeats=False showRepeatIcon=False
showDMicon=True showDMicon=True
titleStr='' titleStr=''
@ -1172,7 +1173,7 @@ def individualPostAsHtml(baseDir: str, \
if showDMicon: if showDMicon:
titleStr='<img src="/icons/dm.png" class="DMicon"/>'+titleStr titleStr='<img src="/icons/dm.png" class="DMicon"/>'+titleStr
if showRepeats: if showRepeatIcon:
if isAnnounced: if isAnnounced:
if postJsonObject['object'].get('attributedTo'): if postJsonObject['object'].get('attributedTo'):
announceNickname=getNicknameFromActor(postJsonObject['object']['attributedTo']) announceNickname=getNicknameFromActor(postJsonObject['object']['attributedTo'])
@ -1274,7 +1275,7 @@ def individualPostAsHtml(baseDir: str, \
footerStr='<span class="'+timeClass+'">'+publishedStr+'</span>\n' footerStr='<span class="'+timeClass+'">'+publishedStr+'</span>\n'
announceStr='' announceStr=''
if not isModerationPost and showRepeats: if not isModerationPost and showRepeatIcon:
# don't allow announce/repeat of your own posts # don't allow announce/repeat of your own posts
announceIcon='repeat_inactive.png' announceIcon='repeat_inactive.png'
announceLink='repeat' announceLink='repeat'
@ -1323,7 +1324,7 @@ def individualPostAsHtml(baseDir: str, \
break break
footerStr='<div class="'+containerClassIcons+'">' footerStr='<div class="'+containerClassIcons+'">'
if not isModerationPost and showRepeats: if not isModerationPost and showRepeatIcon:
footerStr+='<a href="/users/'+nickname+'?replyto='+replyToLink+'" title="Reply to this post">' footerStr+='<a href="/users/'+nickname+'?replyto='+replyToLink+'" title="Reply to this post">'
else: else:
footerStr+='<a href="/users/'+nickname+'?replydm='+replyToLink+'" title="Reply to this post">' footerStr+='<a href="/users/'+nickname+'?replydm='+replyToLink+'" title="Reply to this post">'