mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-23 07:13:52 -05:00
Handle case of no notes seen before checking notifications
This commit is contained in:
parent
c7fb38b57c
commit
10019b34b0
@ -46,6 +46,9 @@ def _notes_count(account, mastodon):
|
||||
if account.preferences.filter_notifications:
|
||||
notes = [ note for note in notes if note.type == 'mention' or note.type == 'follow']
|
||||
for index, item in enumerate(notes):
|
||||
if account.note_seen is None:
|
||||
account.note_seen = 0
|
||||
account.save()
|
||||
if item.id <= account.note_seen:
|
||||
break
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user