From 2127252ca012a6fb7ee450818cba77472f108121 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 13 Dec 2020 13:43:09 +0000 Subject: [PATCH] Add space --- utils.py | 7 ++----- webapp_person_options.py | 2 +- webapp_profile.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/utils.py b/utils.py index b79f760a2..120a02394 100644 --- a/utils.py +++ b/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 diff --git a/webapp_person_options.py b/webapp_person_options.py index f6f098e81..b18d5460a 100644 --- a/webapp_person_options.py +++ b/webapp_person_options.py @@ -115,7 +115,7 @@ def htmlPersonOptions(defaultTimeline: str, handle = getNicknameFromActor(optionsActor) + '@' + optionsDomain handleShown = handle if dormant: - handleShown += '💤' + handleShown += ' 💤' optionsStr += \ '

' + translate['Options for'] + \ ' @' + handleShown + '

\n' diff --git a/webapp_profile.py b/webapp_profile.py index c2c5ac9c7..21fdbc4e1 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -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'