mirror of https://gitlab.com/bashrc2/epicyon
Add space
parent
9ed343865d
commit
2127252ca0
7
utils.py
7
utils.py
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue