Add space

main
Bob Mottram 2020-12-13 13:43:09 +00:00
parent 9ed343865d
commit 2127252ca0
3 changed files with 4 additions and 7 deletions

View File

@ -33,14 +33,11 @@ def isDormant(baseDir: str, nickname: str, domain: str, actor: str,
with open(lastSeenFilename, 'r') as lastSeenFile:
daysSinceEpochStr = lastSeenFile.read()
if not daysSinceEpochStr:
return False
if not daysSinceEpochStr.isdigit():
return False
daysSinceEpoch = int(daysSinceEpoch)
currTime = datetime.datetime.utcnow()
currDaysSinceEpoch = (currTime - datetime.datetime(1970, 1, 1)).days
timeDiffMonths = \
int((currDaysSinceEpoch - int(daysSinceEpochStr)) / 30)
int((currDaysSinceEpoch - daysSinceEpochStr) / 30)
if timeDiffMonths >= dormantMonths:
return True
return False

View File

@ -115,7 +115,7 @@ def htmlPersonOptions(defaultTimeline: str,
handle = getNicknameFromActor(optionsActor) + '@' + optionsDomain
handleShown = handle
if dormant:
handleShown += '💤'
handleShown += ' 💤'
optionsStr += \
' <p class="optionsText">' + translate['Options for'] + \
' @' + handleShown + '</p>\n'

View File

@ -1457,7 +1457,7 @@ def individualFollowAsHtml(translate: {},
domain, port = getDomainFromActor(followUrl)
titleStr = '@' + nickname + '@' + domain
if dormant:
titleStr += '💤'
titleStr += ' 💤'
avatarUrl = getPersonAvatarUrl(baseDir, followUrl, personCache, True)
if not avatarUrl:
avatarUrl = followUrl + '/avatar.png'