Skip to content

Commit 22b1d61

Browse files
committed
fix: omit failed message when interrupted sync
1 parent c7b8710 commit 22b1d61

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

grimmory.koplugin/main.lua

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,12 +384,22 @@ function Grimmory:onGrimmorySync(verbose)
384384
end
385385

386386
if not ok then
387-
logger:err("Failed sync", result)
387+
if should_terminate then
388+
logger:info("Sync was interrupted by user")
388389

389-
if verbose then
390-
self.dialog_manager:toast(
391-
T(_("Failed to Synchronize to Grimmory"))
392-
)
390+
if verbose then
391+
self.dialog_manager:toast(
392+
_("Grimmory synchronization has been interrupted")
393+
)
394+
end
395+
else
396+
logger:err("Failed sync", result)
397+
398+
if verbose then
399+
self.dialog_manager:toast(
400+
_("Failed to Synchronize to Grimmory")
401+
)
402+
end
393403
end
394404

395405
return

0 commit comments

Comments
 (0)