diff --git a/desktop_client.py b/desktop_client.py index 192d23033..8c324c06c 100644 --- a/desktop_client.py +++ b/desktop_client.py @@ -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') diff --git a/utils.py b/utils.py index dc6ba6378..d1addc920 100644 --- a/utils.py +++ b/utils.py @@ -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'] = {}