main
Bob Mottram 2021-03-19 11:59:14 +00:00
parent 4dcbbc44e9
commit 7b7f182a2a
1 changed files with 34 additions and 34 deletions

View File

@ -474,11 +474,11 @@ def _formatPublished(published: str) -> str:
return monthStr + '-' + dayStr + ' ' + hourStr + ':' + minStr + 'Z' return monthStr + '-' + dayStr + ' ' + hourStr + ':' + minStr + 'Z'
def _desktopShowBoxJson(boxName: str, boxJson: {}, def _desktopShowBox(boxName: str, boxJson: {},
screenreader: str, systemLanguage: str, espeak, screenreader: str, systemLanguage: str, espeak,
pageNumber=1, pageNumber=1,
newReplies=False, newReplies=False,
newDMs=False) -> bool: newDMs=False) -> bool:
"""Shows online timeline """Shows online timeline
""" """
indent = ' ' indent = ' '
@ -830,11 +830,11 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
timelineFirstId = _getFirstItemId(boxJson) timelineFirstId = _getFirstItemId(boxJson)
if timelineFirstId != prevTimelineFirstId: if timelineFirstId != prevTimelineFirstId:
_desktopClearScreen() _desktopClearScreen()
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
None, systemLanguage, espeak, None, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newRepliesExist,
newDMsExist) newDMsExist)
prevTimelineFirstId = timelineFirstId prevTimelineFirstId = timelineFirstId
# wait for a while, or until a key is pressed # wait for a while, or until a key is pressed
@ -864,10 +864,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
newDMsExist = False newDMsExist = False
elif commandStr.startswith('show rep'): elif commandStr.startswith('show rep'):
pageNumber = 1 pageNumber = 1
@ -879,10 +879,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
# Turn off the replies indicator # Turn off the replies indicator
newRepliesExist = False newRepliesExist = False
elif commandStr.startswith('show sen'): elif commandStr.startswith('show sen'):
@ -895,10 +895,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
elif (commandStr == 'show' or commandStr.startswith('show in') or elif (commandStr == 'show' or commandStr.startswith('show in') or
commandStr == 'clear'): commandStr == 'clear'):
pageNumber = 1 pageNumber = 1
@ -910,10 +910,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
elif commandStr.startswith('next'): elif commandStr.startswith('next'):
pageNumber += 1 pageNumber += 1
prevTimelineFirstId = '' prevTimelineFirstId = ''
@ -923,10 +923,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
elif commandStr.startswith('prev'): elif commandStr.startswith('prev'):
pageNumber -= 1 pageNumber -= 1
if pageNumber < 1: if pageNumber < 1:
@ -938,10 +938,10 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
currTimeline, pageNumber, currTimeline, pageNumber,
debug) debug)
if boxJson: if boxJson:
_desktopShowBoxJson(currTimeline, boxJson, _desktopShowBox(currTimeline, boxJson,
screenreader, systemLanguage, espeak, screenreader, systemLanguage, espeak,
pageNumber, pageNumber,
newRepliesExist, newDMsExist) newRepliesExist, newDMsExist)
elif commandStr.startswith('read ') or commandStr == 'read': elif commandStr.startswith('read ') or commandStr == 'read':
if commandStr == 'read': if commandStr == 'read':
postIndexStr = '1' postIndexStr = '1'