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