Less indentation

main
Bob Mottram 2020-12-01 10:15:26 +00:00
parent 67b024e128
commit aea95f131f
1 changed files with 31 additions and 25 deletions

View File

@ -376,11 +376,13 @@ def getAnnounceIconHtml(nickname: str, domainFull: str,
if not isPublicRepeat: if not isPublicRepeat:
announceLink = 'repeatprivate' announceLink = 'repeatprivate'
announceTitle = translate['Repeat this post'] announceTitle = translate['Repeat this post']
if announcedByPerson(postJsonObject, nickname, domainFull): if announcedByPerson(postJsonObject, nickname, domainFull):
announceIcon = 'repeat.png' announceIcon = 'repeat.png'
if not isPublicRepeat: if not isPublicRepeat:
announceLink = 'unrepeatprivate' announceLink = 'unrepeatprivate'
announceTitle = translate['Undo the repeat'] announceTitle = translate['Undo the repeat']
announceStr = \ announceStr = \
' <a class="imageAnchor" href="/users/' + \ ' <a class="imageAnchor" href="/users/' + \
nickname + '?' + announceLink + \ nickname + '?' + announceLink + \
@ -388,6 +390,7 @@ def getAnnounceIconHtml(nickname: str, domainFull: str,
'?actor=' + postJsonObject['actor'] + \ '?actor=' + postJsonObject['actor'] + \
'?bm=' + timelinePostBookmark + \ '?bm=' + timelinePostBookmark + \
'?tl=' + boxName + '" title="' + announceTitle + '">\n' '?tl=' + boxName + '" title="' + announceTitle + '">\n'
announceStr += \ announceStr += \
' ' + \ ' ' + \
'<img loading="lazy" title="' + translate['Repeat this post'] + \ '<img loading="lazy" title="' + translate['Repeat this post'] + \
@ -474,7 +477,10 @@ def getBookmarkIconHtml(nickname: str, domainFull: str,
"""Returns html for bookmark icon/button """Returns html for bookmark icon/button
""" """
bookmarkStr = '' bookmarkStr = ''
if not isModerationPost:
if isModerationPost:
return bookmarkStr
bookmarkIcon = 'bookmark_inactive.png' bookmarkIcon = 'bookmark_inactive.png'
bookmarkLink = 'bookmark' bookmarkLink = 'bookmark'
bookmarkTitle = translate['Bookmark this post'] bookmarkTitle = translate['Bookmark this post']