~roshless/nnrss-qt

5574bd1af7eaaa8a1ba8269ffd6978cce154a4e9 — Roshless 1 year, 1 month ago 84963b1
feat: do not show notification for no new entries
1 files changed, 4 insertions(+), 3 deletions(-)

M nnrss_qt/main_window.py
M nnrss_qt/main_window.py => nnrss_qt/main_window.py +4 -3
@@ 287,9 287,10 @@ class MainWindow(QMainWindow):
        self.load_all_entries_thread.start()

    def update_feeds_finish(self, updated_entries_count: int):
        title = "Feeds updated"
        body = "{} new entries".format(str(updated_entries_count))
        run(["notify-send", title, body, "--icon=/usr/share/nnrss_qt/feed_icon.svg"])
        if updated_entries_count > 0:
            title = "Feeds updated"
            body = "{} new entries".format(str(updated_entries_count))
            run(["notify-send", title, body, "--icon=/usr/share/nnrss_qt/feed_icon.svg"])

    def closeEvent(self, event):
        self.api_handler.save_cached()