Show annonce even if avatar is not available

merge-requests/30/head
Bob Mottram 2021-07-21 21:33:26 +01:00
parent e8fdcf70da
commit 0286294931
1 changed files with 15 additions and 14 deletions

View File

@ -825,20 +825,21 @@ def _getPostTitleAnnounceHtml(baseDir: str,
_logPostTiming(enableTimingLog, postStartTime, '13.4')
if announceAvatarUrl:
idx = 'Show options for this person'
if '/users/news/' not in announceAvatarUrl:
replyAvatarImageInPost = \
' <div class="timeline-avatar-reply">\n' \
' <a class="imageAnchor" ' + \
'href="/users/' + nickname + '?options=' + \
announceActor + ';' + str(pageNumber) + \
';' + announceAvatarUrl + messageIdStr + '">' \
'<img loading="lazy" src="' + \
announceAvatarUrl + '" ' + \
'title="' + translate[idx] + \
'" alt=" "' + avatarPosition + \
getBrokenLinkSubstitute() + '/></a>\n </div>\n'
if not announceAvatarUrl:
announceAvatarUrl = ''
idx = 'Show options for this person'
if '/users/news/' not in announceAvatarUrl:
replyAvatarImageInPost = \
' <div class="timeline-avatar-reply">\n' \
' <a class="imageAnchor" ' + \
'href="/users/' + nickname + '?options=' + \
announceActor + ';' + str(pageNumber) + \
';' + announceAvatarUrl + messageIdStr + '">' \
'<img loading="lazy" src="' + \
announceAvatarUrl + '" ' + \
'title="' + translate[idx] + \
'" alt=" "' + avatarPosition + \
getBrokenLinkSubstitute() + '/></a>\n </div>\n'
return (titleStr, replyAvatarImageInPost,
containerClassIcons, containerClass)