diff --git a/50_bubble.py b/50_bubble.py index 079979a..52a8dab 100644 --- a/50_bubble.py +++ b/50_bubble.py @@ -18,7 +18,7 @@ from utils import * from worker import *   -__version__ = '7.3' +__version__ = '7.4'   class Bubble: diff --git a/user.py b/user.py index 3881401..32acd41 100644 --- a/user.py +++ b/user.py @@ -310,8 +310,11 @@ class Subgrouping: def render(self): src = [] top_head = False + prev_top_head = False for post_id, notifs in self.by_post.items(): + prev_top_head = top_head top_head = post_id and len(notifs) > 1 + # Print a common heading. if top_head: n = notifs[0] if n.post_subname and n.post_subowner != self.user.id: @@ -321,6 +324,10 @@ class Subgrouping: if src: src.append('') src.append(f'"{n.title_text()}"{sub_text}:') + elif prev_top_head: + # Sepearate from previous grouping. + src.append('') + # Print the notifications. for notif in notifs: src.append('=> %s %s' % notif.entry(with_title=not top_head)) return '\n'.join(src) + '\n'