mirror of https://git.skyjake.fi/gemini/bubble.git
Handling a malformed reaction notification
This commit is contained in:
parent
f2d742a557
commit
18061b9697
2
model.py
2
model.py
|
@ -157,7 +157,7 @@ class Notification:
|
|||
icon = '🙏 '
|
||||
elif self.type == Notification.REACTION:
|
||||
event = f'reacted to your {kind}'
|
||||
icon = self.reaction + ' '
|
||||
icon = (self.reaction if self.reaction else '🔔') + ' '
|
||||
elif self.type == Notification.COMMENT:
|
||||
event = f'commented on your {kind}'
|
||||
icon = '💬 '
|
||||
|
|
6
user.py
6
user.py
|
@ -348,11 +348,7 @@ class Subgrouping:
|
|||
src.append('')
|
||||
# Print the notifications.
|
||||
for notif in notifs:
|
||||
try:
|
||||
src.append('=> %s %s' % notif.entry(with_title=not top_head))
|
||||
except:
|
||||
# FIXME: notif.reaction can be None sometimes? A cancelled notification?
|
||||
pass
|
||||
src.append('=> %s %s' % notif.entry(with_title=not top_head))
|
||||
return '\n'.join(src) + '\n'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue