Merge branch 'main' of ssh://code.freedombone.net:2222/bashrc/epicyon into main

main
Bob Mottram 2021-03-25 22:05:09 +00:00
commit d8aee36265
2 changed files with 4 additions and 8 deletions

View File

@ -1075,12 +1075,6 @@ def _desktopShowBox(indent: str,
# say the post number range
sayStr = indent + boxNameStr + ' page ' + str(pageNumber) + \
' containing ' + str(ctr - 1) + ' posts. '
if newDMs and boxName != 'dm':
sayStr += \
'Use \33[3mshow dm\33[0m to view direct messages.'
elif newReplies and boxName != 'tlreplies':
sayStr += \
'Use \33[3mshow replies\33[0m to view reply posts.'
sayStr2 = sayStr.replace('\33[3m', '').replace('\33[0m', '')
sayStr2 = sayStr2.replace('show dm', 'show DM')
sayStr2 = sayStr2.replace('dm post', 'Direct message post')

View File

@ -1546,8 +1546,10 @@ def updateRecentPostsCache(recentPostsCache: {}, maxRecentPosts: int,
while len(recentPostsCache['html'].items()) > maxRecentPosts:
postId = recentPostsCache['index'][0]
recentPostsCache['index'].pop(0)
del recentPostsCache['json'][postId]
del recentPostsCache['html'][postId]
if recentPostsCache['json'].get(postId):
del recentPostsCache['json'][postId]
if recentPostsCache['html'].get(postId):
del recentPostsCache['html'][postId]
else:
recentPostsCache['index'] = [postId]
recentPostsCache['json'] = {}