From 9b03b416ab46ae572ca20b8838137a35bfd80d8b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 12:12:29 +0000 Subject: [PATCH] Show timeline banner --- notifications_client.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index 177db5a16..a09053964 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -392,7 +392,7 @@ def _readLocalBoxPost(boxName: str, index: int, def _showLocalBox(notifyJson: {}, boxName: str, screenreader: str, systemLanguage: str, espeak, - startPostIndex=0, noOfPosts=10) -> None: + startPostIndex=0, noOfPosts=10) -> bool: """Shows locally stored posts for a given subdirectory """ indent = ' ' @@ -410,15 +410,17 @@ def _showLocalBox(notifyJson: {}, boxName: str, if not f.endswith('.json'): continue index.append(f) - if not index: - sayStr = 'You have no ' + boxName + ' posts yet.' - _sayCommand(sayStr, sayStr, screenreader, systemLanguage, espeak) - print('') - return # title _clearScreen() _showDesktopBanner() + + if not index: + sayStr = 'You have no ' + boxName + ' posts yet.' + _sayCommand(sayStr, sayStr, screenreader, systemLanguage, espeak) + print('') + return False + notificationIcons = '' if notifyJson: if notifyJson.get('followRequests'): @@ -511,6 +513,7 @@ def _showLocalBox(notifyJson: {}, boxName: str, _sayCommand(sayStr, sayStr2, screenreader, systemLanguage, espeak) print('') + return True def _notificationNewDM(session, toHandle: str,