Files
OrcaSlicer/tests/slic3rutils
weng haishiandIan Chua d64ebfc0ef fix: fetch subscribed bundles on focus instead of every minute (#17939)
* fix: fetch subscribed bundles on focus instead of every minute

The preset sync loop asked Orca Cloud for the subscribed bundles every
60 s in every signed-in window, even in the background, though most users
have none. The preset push and deletes keep their 60 s cadence; the
subscriptions are now fetched:

- on the sync thread's first pass (startup, sign-in, Sync Presets);
- when the main window gains focus, the cloud pane closes, or the user
  leaves the Home tab with the cloud pane open, at most once a minute
  (a request inside the minute is kept until the minute is up);
- every 30 minutes for users who have subscribed bundles.

The schedule is OrcaCloudServiceAgent::subscriptions_fetch_due, covered
by new tests in test_orca_cloud_agent.cpp.

* fix: fetch subscribed bundles right after an unsubscribe

The Preset Bundle dialog's Unsubscribe only tells the server. The local
copy is removed by the sync loop's next subscriptions fetch, and while
the modal dialog is open nothing else asks for one, so the bundle stayed
listed. Ask for a fetch after a successful unsubscribe, so it goes within
a minute, as before.

* fix: poll subscriptions for all users with bounded retry traffic

---------

Co-authored-by: Ian Chua <iancrb00@gmail.com>
2026-12-01 21:16:30 +08:00
..