From 366137e49a65d81c4ffb07c6745190c16b6e0514 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 2 Jun 2026 19:27:47 -0400 Subject: [PATCH] Guard push against no document open --- main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.lua b/main.lua index ca036d6..3eef056 100644 --- a/main.lua +++ b/main.lua @@ -884,6 +884,16 @@ function Bookhoard:updateProgress(ensure_networking, interactive) if not self.settings.sync_progress then return end + if not self.ui.document then + if interactive then + UIManager:show(InfoMessage:new{ + text = _("No document open."), + timeout = 3, + }) + end + return + end + local now = UIManager:getElapsedTimeSinceBoot() if not interactive and now - self.push_timestamp <= API_CALL_DEBOUNCE_DELAY then return