Handle no notifications

merge-requests/21/head
Bob Mottram 2021-03-15 17:52:41 +00:00
parent 4c794b0155
commit 058b88577c
1 changed files with 14 additions and 13 deletions

View File

@ -409,19 +409,20 @@ def _showLocalBox(notifyJson: {}, boxName: str,
_clearScreen() _clearScreen()
_showDesktopBanner() _showDesktopBanner()
notificationIcons = '' notificationIcons = ''
if notifyJson.get('followRequests'): if notifyJson:
notificationIcons += '👤' if notifyJson.get('followRequests'):
if notifyJson.get('dm'): notificationIcons += '👤'
notificationIcons += '📩' if notifyJson.get('dm'):
if notifyJson.get('reply'): notificationIcons += '📩'
notificationIcons += '📨' if notifyJson.get('reply'):
if notifyJson.get('calendar'): notificationIcons += '📨'
notificationIcons += '📅' if notifyJson.get('calendar'):
if notifyJson.get('share'): notificationIcons += '📅'
notificationIcons += '🤝' if notifyJson.get('share'):
if notifyJson.get('likedBy'): notificationIcons += '🤝'
if '##sent##' not in notifyJson['likedBy']: if notifyJson.get('likedBy'):
notificationIcons += '' if '##sent##' not in notifyJson['likedBy']:
notificationIcons += ''
titleStr = boxName.upper() titleStr = boxName.upper()
if notificationIcons: if notificationIcons:
while len(titleStr) < 40 - len(notificationIcons): while len(titleStr) < 40 - len(notificationIcons):