mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
9e8045d047
commit
e982515043
|
@ -865,6 +865,12 @@ def _padToWidth(content: str, width: int) -> str:
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
|
||||||
|
def _highlightText(text: str) -> str:
|
||||||
|
"""Returns a highlighted version of the given text
|
||||||
|
"""
|
||||||
|
return '\33[7m' + text + '\33[0m'
|
||||||
|
|
||||||
|
|
||||||
def _desktopShowBox(yourActor: str, boxName: str, boxJson: {},
|
def _desktopShowBox(yourActor: str, boxName: str, boxJson: {},
|
||||||
screenreader: str, systemLanguage: str, espeak,
|
screenreader: str, systemLanguage: str, espeak,
|
||||||
pageNumber=1,
|
pageNumber=1,
|
||||||
|
@ -886,7 +892,7 @@ def _desktopShowBox(yourActor: str, boxName: str, boxJson: {},
|
||||||
boxNameStr = boxName[2:]
|
boxNameStr = boxName[2:]
|
||||||
else:
|
else:
|
||||||
boxNameStr = boxName
|
boxNameStr = boxName
|
||||||
titleStr = '\33[7m' + boxNameStr.upper() + '\33[0m'
|
titleStr = _highlightText(boxNameStr.upper())
|
||||||
|
|
||||||
if newDMs:
|
if newDMs:
|
||||||
notificationIcons += ' 📩'
|
notificationIcons += ' 📩'
|
||||||
|
@ -1010,9 +1016,10 @@ def _desktopShowBox(yourActor: str, boxName: str, boxJson: {},
|
||||||
published + ' | ' + content
|
published + ' | ' + content
|
||||||
if boxName == 'inbox' and \
|
if boxName == 'inbox' and \
|
||||||
_postIsToYou(yourActor, postJsonObject):
|
_postIsToYou(yourActor, postJsonObject):
|
||||||
if not _hasReadPost(actor, postJsonObject['id'], 'dm'):
|
if not _hasReadPost(yourActor, postJsonObject['id'], 'dm'):
|
||||||
if not _hasReadPost(actor, postJsonObject['id'], 'replies'):
|
if not _hasReadPost(yourActor, postJsonObject['id'],
|
||||||
lineStr = '\33[7m' + lineStr + '\33[0m'
|
'replies'):
|
||||||
|
lineStr = _highlightText(lineStr)
|
||||||
print(lineStr)
|
print(lineStr)
|
||||||
ctr += 1
|
ctr += 1
|
||||||
|
|
||||||
|
|
2
inbox.py
2
inbox.py
|
@ -1593,7 +1593,7 @@ def populateReplies(baseDir: str, httpPrefix: str, domain: str,
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: no domain found for ' + replyTo)
|
print('DEBUG: no domain found for ' + replyTo)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
postFilename = locatePost(baseDir, replyToNickname,
|
postFilename = locatePost(baseDir, replyToNickname,
|
||||||
replyToDomain, replyTo)
|
replyToDomain, replyTo)
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
|
|
Loading…
Reference in New Issue