Tidying
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 181 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 202 KiB |
|
@ -948,20 +948,25 @@ def _getPostTitleReplyHtml(baseDir: str,
|
||||||
"""
|
"""
|
||||||
titleStr = ''
|
titleStr = ''
|
||||||
replyAvatarImageInPost = ''
|
replyAvatarImageInPost = ''
|
||||||
|
objJson = postJsonObject['object']
|
||||||
|
|
||||||
if not postJsonObject['object'].get('inReplyTo'):
|
# not a reply
|
||||||
|
if not objJson.get('inReplyTo'):
|
||||||
return (titleStr, replyAvatarImageInPost,
|
return (titleStr, replyAvatarImageInPost,
|
||||||
containerClassIcons, containerClass)
|
containerClassIcons, containerClass)
|
||||||
|
|
||||||
containerClassIcons = 'containericons darker'
|
containerClassIcons = 'containericons darker'
|
||||||
containerClass = 'container darker'
|
containerClass = 'container darker'
|
||||||
if postJsonObject['object']['inReplyTo'].startswith(postActor):
|
|
||||||
|
# reply to self
|
||||||
|
if objJson['inReplyTo'].startswith(postActor):
|
||||||
titleStr += _replyToYourselfHtml(translate)
|
titleStr += _replyToYourselfHtml(translate)
|
||||||
return (titleStr, replyAvatarImageInPost,
|
return (titleStr, replyAvatarImageInPost,
|
||||||
containerClassIcons, containerClass)
|
containerClassIcons, containerClass)
|
||||||
|
|
||||||
if '/statuses/' in postJsonObject['object']['inReplyTo']:
|
# has a reply
|
||||||
inReplyTo = postJsonObject['object']['inReplyTo']
|
if '/statuses/' in objJson['inReplyTo']:
|
||||||
|
inReplyTo = objJson['inReplyTo']
|
||||||
replyActor = inReplyTo.split('/statuses/')[0]
|
replyActor = inReplyTo.split('/statuses/')[0]
|
||||||
replyNickname = getNicknameFromActor(replyActor)
|
replyNickname = getNicknameFromActor(replyActor)
|
||||||
if replyNickname:
|
if replyNickname:
|
||||||
|
@ -980,12 +985,9 @@ def _getPostTitleReplyHtml(baseDir: str,
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '13.5')
|
_logPostTiming(enableTimingLog, postStartTime, '13.5')
|
||||||
|
|
||||||
replyDisplayName = \
|
replyDisplayName = \
|
||||||
addEmojiToDisplayName(baseDir,
|
addEmojiToDisplayName(baseDir, httpPrefix,
|
||||||
httpPrefix,
|
nickname, domain,
|
||||||
nickname,
|
replyDisplayName, False)
|
||||||
domain,
|
|
||||||
replyDisplayName,
|
|
||||||
False)
|
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '13.6')
|
_logPostTiming(enableTimingLog, postStartTime, '13.6')
|
||||||
|
|
||||||
titleStr += \
|
titleStr += \
|
||||||
|
@ -995,10 +997,8 @@ def _getPostTitleReplyHtml(baseDir: str,
|
||||||
|
|
||||||
# show avatar of person replied to
|
# show avatar of person replied to
|
||||||
replyAvatarUrl = \
|
replyAvatarUrl = \
|
||||||
getPersonAvatarUrl(baseDir,
|
getPersonAvatarUrl(baseDir, replyActor,
|
||||||
replyActor,
|
personCache, allowDownloads)
|
||||||
personCache,
|
|
||||||
allowDownloads)
|
|
||||||
|
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '13.8')
|
_logPostTiming(enableTimingLog, postStartTime, '13.8')
|
||||||
|
|
||||||
|
@ -1027,8 +1027,7 @@ def _getPostTitleReplyHtml(baseDir: str,
|
||||||
getBrokenLinkSubstitute() + \
|
getBrokenLinkSubstitute() + \
|
||||||
'/></a>\n </div>\n'
|
'/></a>\n </div>\n'
|
||||||
else:
|
else:
|
||||||
inReplyTo = \
|
inReplyTo = objJson['inReplyTo']
|
||||||
postJsonObject['object']['inReplyTo']
|
|
||||||
titleStr += \
|
titleStr += \
|
||||||
_getReplyWithoutDisplayName(translate,
|
_getReplyWithoutDisplayName(translate,
|
||||||
inReplyTo,
|
inReplyTo,
|
||||||
|
@ -1038,8 +1037,7 @@ def _getPostTitleReplyHtml(baseDir: str,
|
||||||
titleStr += \
|
titleStr += \
|
||||||
_replyToUnknownHtml(translate, postJsonObject)
|
_replyToUnknownHtml(translate, postJsonObject)
|
||||||
else:
|
else:
|
||||||
postDomain = \
|
postDomain = objJson['inReplyTo']
|
||||||
postJsonObject['object']['inReplyTo']
|
|
||||||
prefixes = getProtocolPrefixes()
|
prefixes = getProtocolPrefixes()
|
||||||
for prefix in prefixes:
|
for prefix in prefixes:
|
||||||
postDomain = postDomain.replace(prefix, '')
|
postDomain = postDomain.replace(prefix, '')
|
||||||
|
|