From 5c983cc9e019ee6bf375370d11fe2dd03461d0e5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 18:25:10 +0000 Subject: [PATCH 1/2] Tidying --- notifications_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index eb2253d3b..bc7b41cc9 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -824,11 +824,11 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, indicatorDM = False if speakerJson.get('direct'): if speakerJson['direct'] is True: - indicatorDM = speakerJson.get('direct') + indicatorDM = True indicatorReplies = False if speakerJson.get('replyToYou'): if speakerJson['replyToYou'] is True: - indicatorReplies = speakerJson.get('replyToYou') + indicatorReplies = True if firstTime: # If new DM has not been viewed via web interface if not speakerJson.get('direct'): From 931e5a2080423f5e68a042ef637962cf4687952d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 18:30:37 +0000 Subject: [PATCH 2/2] Don't try to align with web interface --- notifications_client.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index bc7b41cc9..3a9f01501 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -799,7 +799,6 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, newRepliesExist = False newDMsExist = False currPostId = '' - firstTime = True while (1): session = createSession(proxyType) notifyJson = None @@ -829,17 +828,6 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, if speakerJson.get('replyToYou'): if speakerJson['replyToYou'] is True: indicatorReplies = True - if firstTime: - # If new DM has not been viewed via web interface - if not speakerJson.get('direct'): - if speakerJson['notify']['dm']: - indicatorDM = True - - # If new reply has not been viewed via web interface - if not speakerJson.get('replyToYou'): - if speakerJson['notify']['reply']: - indicatorReplies = True - firstTime = False if indicatorDM: if currPostId != speakerJson['id']: @@ -950,15 +938,6 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, if storeInboxPosts: _storeMessage(speakerJson, 'inbox') - # DM has been viewed via the web interface - if newDMsExist and \ - not speakerJson['notify']['dm']: - newDMsExist = False - # Reply has been viewed via the web interface - if newRepliesExist and \ - not speakerJson['notify']['reply']: - newRepliesExist = False - if not showNewPosts: _clearScreen() _showLocalBox(notifyJson, currTimeline,