Page MenuHomePhorge

Extract sync preparation and single sync cycle into own functions
ClosedPublic

Authored by tusooa on Apr 15 2026, 6:58 PM.

Details

Summary

Allow the application to call ensureReadyForSyncing() and doOneSyncCycle() to gain finer control to the sync process. For example, they can decide when to retry if there is a failure, instead of relying on the fixed logic in syncForever(). There is no behaviour change for applications.

Currently, these functions offer no particular interest to applications because the login functions will still call startSyncing(). In the future, we will add other login functions that do not call startSyncing() to replace the current functions. However, this change is still useful for unit tests, because it allows us to assert model changes after "one sync cycle."

CCBUG: https://iron.lily-is.land/T110

Type: skip

Test Plan

Test kazv works the same way as before.

Diff Detail

Repository
rL libkazv
Lint
Lint Not Applicable
Unit
Tests Not Applicable