mirror of https://gitlab.com/bashrc2/epicyon
Refresh timeline after some commands
parent
b2b1aa6013
commit
15d62ab6b8
|
@ -994,6 +994,8 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
else:
|
else:
|
||||||
commandStr = _desktopWaitForCmd(30, debug)
|
commandStr = _desktopWaitForCmd(30, debug)
|
||||||
if commandStr:
|
if commandStr:
|
||||||
|
refreshTimeline = False
|
||||||
|
|
||||||
if commandStr.startswith('/'):
|
if commandStr.startswith('/'):
|
||||||
commandStr = commandStr[1:]
|
commandStr = commandStr[1:]
|
||||||
if commandStr == 'q' or \
|
if commandStr == 'q' or \
|
||||||
|
@ -1072,29 +1074,11 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
pageNumber = 1
|
pageNumber = 1
|
||||||
prevTimelineFirstId = ''
|
prevTimelineFirstId = ''
|
||||||
currTimeline = 'inbox'
|
currTimeline = 'inbox'
|
||||||
boxJson = c2sBoxJson(baseDir, session,
|
refreshTimeline = True
|
||||||
nickname, password,
|
|
||||||
domain, port, httpPrefix,
|
|
||||||
currTimeline, pageNumber,
|
|
||||||
debug)
|
|
||||||
if boxJson:
|
|
||||||
_desktopShowBox(currTimeline, boxJson,
|
|
||||||
screenreader, systemLanguage, espeak,
|
|
||||||
pageNumber,
|
|
||||||
newRepliesExist, newDMsExist)
|
|
||||||
elif commandStr.startswith('next'):
|
elif commandStr.startswith('next'):
|
||||||
pageNumber += 1
|
pageNumber += 1
|
||||||
prevTimelineFirstId = ''
|
prevTimelineFirstId = ''
|
||||||
boxJson = c2sBoxJson(baseDir, session,
|
refreshTimeline = True
|
||||||
nickname, password,
|
|
||||||
domain, port, httpPrefix,
|
|
||||||
currTimeline, pageNumber,
|
|
||||||
debug)
|
|
||||||
if boxJson:
|
|
||||||
_desktopShowBox(currTimeline, boxJson,
|
|
||||||
screenreader, systemLanguage, espeak,
|
|
||||||
pageNumber,
|
|
||||||
newRepliesExist, newDMsExist)
|
|
||||||
elif commandStr.startswith('prev'):
|
elif commandStr.startswith('prev'):
|
||||||
pageNumber -= 1
|
pageNumber -= 1
|
||||||
if pageNumber < 1:
|
if pageNumber < 1:
|
||||||
|
@ -1139,6 +1123,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
debug, subject,
|
debug, subject,
|
||||||
screenreader, systemLanguage,
|
screenreader, systemLanguage,
|
||||||
espeak)
|
espeak)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr == 'post' or commandStr == 'p' or
|
elif (commandStr == 'post' or commandStr == 'p' or
|
||||||
commandStr == 'send' or
|
commandStr == 'send' or
|
||||||
|
@ -1181,6 +1166,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
debug,
|
debug,
|
||||||
screenreader, systemLanguage,
|
screenreader, systemLanguage,
|
||||||
espeak)
|
espeak)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif commandStr == 'like' or commandStr.startswith('like '):
|
elif commandStr == 'like' or commandStr.startswith('like '):
|
||||||
currIndex = 0
|
currIndex = 0
|
||||||
|
@ -1206,6 +1192,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
postJsonObject['id'],
|
postJsonObject['id'],
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr == 'undo mute' or
|
elif (commandStr == 'undo mute' or
|
||||||
commandStr == 'undo ignore' or
|
commandStr == 'undo ignore' or
|
||||||
|
@ -1243,17 +1230,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
httpPrefix, postJsonObject['id'],
|
httpPrefix, postJsonObject['id'],
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
boxJson = c2sBoxJson(baseDir, session,
|
|
||||||
nickname, password,
|
|
||||||
domain, port, httpPrefix,
|
|
||||||
currTimeline, pageNumber,
|
|
||||||
debug)
|
|
||||||
if boxJson:
|
|
||||||
_desktopShowBox(currTimeline, boxJson,
|
|
||||||
screenreader, systemLanguage,
|
|
||||||
espeak, pageNumber,
|
|
||||||
newRepliesExist, newDMsExist)
|
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr == 'mute' or
|
elif (commandStr == 'mute' or
|
||||||
commandStr == 'ignore' or
|
commandStr == 'ignore' or
|
||||||
|
@ -1282,16 +1259,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
httpPrefix, postJsonObject['id'],
|
httpPrefix, postJsonObject['id'],
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
boxJson = c2sBoxJson(baseDir, session,
|
refreshTimeline = True
|
||||||
nickname, password,
|
|
||||||
domain, port, httpPrefix,
|
|
||||||
currTimeline, pageNumber,
|
|
||||||
debug)
|
|
||||||
if boxJson:
|
|
||||||
_desktopShowBox(currTimeline, boxJson,
|
|
||||||
screenreader, systemLanguage,
|
|
||||||
espeak, pageNumber,
|
|
||||||
newRepliesExist, newDMsExist)
|
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr == 'undo bookmark' or
|
elif (commandStr == 'undo bookmark' or
|
||||||
commandStr == 'remove bookmark' or
|
commandStr == 'remove bookmark' or
|
||||||
|
@ -1332,6 +1300,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr == 'bookmark' or
|
elif (commandStr == 'bookmark' or
|
||||||
commandStr == 'bm' or
|
commandStr == 'bm' or
|
||||||
|
@ -1360,6 +1329,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
postJsonObject['id'],
|
postJsonObject['id'],
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif commandStr == 'unlike' or commandStr == 'undo like':
|
elif commandStr == 'unlike' or commandStr == 'undo like':
|
||||||
currIndex = 0
|
currIndex = 0
|
||||||
|
@ -1386,6 +1356,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
postJsonObject['id'],
|
postJsonObject['id'],
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
False, __version__)
|
False, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr.startswith('announce') or
|
elif (commandStr.startswith('announce') or
|
||||||
commandStr.startswith('boost') or
|
commandStr.startswith('boost') or
|
||||||
|
@ -1415,6 +1386,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
httpPrefix, postId,
|
httpPrefix, postId,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
True, __version__)
|
True, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif (commandStr.startswith('unannounce') or
|
elif (commandStr.startswith('unannounce') or
|
||||||
commandStr.startswith('undo announce') or
|
commandStr.startswith('undo announce') or
|
||||||
|
@ -1448,6 +1420,7 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
True, __version__)
|
True, __version__)
|
||||||
|
refreshTimeline = True
|
||||||
print('')
|
print('')
|
||||||
elif commandStr.startswith('follow '):
|
elif commandStr.startswith('follow '):
|
||||||
followHandle = commandStr.replace('follow ', '').strip()
|
followHandle = commandStr.replace('follow ', '').strip()
|
||||||
|
@ -1606,3 +1579,15 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
print('')
|
print('')
|
||||||
elif commandStr.startswith('h'):
|
elif commandStr.startswith('h'):
|
||||||
_desktopHelp()
|
_desktopHelp()
|
||||||
|
|
||||||
|
if refreshTimeline:
|
||||||
|
boxJson = c2sBoxJson(baseDir, session,
|
||||||
|
nickname, password,
|
||||||
|
domain, port, httpPrefix,
|
||||||
|
currTimeline, pageNumber,
|
||||||
|
debug)
|
||||||
|
if boxJson:
|
||||||
|
_desktopShowBox(currTimeline, boxJson,
|
||||||
|
screenreader, systemLanguage,
|
||||||
|
espeak, pageNumber,
|
||||||
|
newRepliesExist, newDMsExist)
|
||||||
|
|
Loading…
Reference in New Issue