From f149b74332c205b38d73ce17b3e237a01cddafc2 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Mon, 5 Oct 2020 14:04:09 +0200 Subject: [PATCH] Fix repeated version notifications Without this fix the file with the list of notifications looks like this: ``` 0.19.0,1601899026.4373078, ``` which ends up notifying about a new version all the time. --- kitty/update_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/update_check.py b/kitty/update_check.py index 95caa1ea2..689bb8fcc 100644 --- a/kitty/update_check.py +++ b/kitty/update_check.py @@ -90,7 +90,9 @@ def save_notification(version: Version) -> None: for version in sorted(notified_versions): n = notified_versions[version] lines.append('{},{},{}'.format( - '.'.join(map(str, n.version)), n.time_of_last_notification, n.count)) + '.'.join(map(str, n.version)), + n.time_of_last_notification, + n.notification_count)) atomic_save('\n'.join(lines).encode('utf-8'), version_notification_log())