diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-15 15:54:03 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-15 15:54:03 +0200 |
| commit | 1062eedaff00a46918f379bd70d210ce95861c93 (patch) | |
| tree | cecbfa26a57812e515f45103e644dafd5ffa052f /src/mainwindow.h | |
| parent | c3dd54e390d236b7d68bae456ef39c5fa7fb49d5 (diff) | |
| download | qtmaildir-1062eedaff00a46918f379bd70d210ce95861c93.tar.gz qtmaildir-1062eedaff00a46918f379bd70d210ce95861c93.zip | |
fix(sync): re-arm the automatic sync when it skips a concurrent run
runAutoSync() returned without rescheduling when a sync was already in flight.
The comment defending it argued the edits were not lost, because they reached
the mail store at edit time and the running sync was "very likely" to carry
them. Very likely is not always: an edit made after mbsync has already passed
that account's mailbox is not carried by it, the timer had fired, nothing
re-armed it, and the pending count sat non-zero until a manual sync or the next
cron run.
Skipping is unchanged and still required by item 71: the cron job holds the same
lock and mbsync fails on a second concurrent run. What changes is that the skip
schedules another attempt. scheduleAutoSync() re-checks the delay, the sync
command and the pending count on the way in, so this cannot arm a sync for
nothing, and against a long external sync it re-arms once per debounce interval,
which is a timer rather than a sync.
The test fires the timer by hand and asserts it is active again afterwards, at
the configured interval rather than a shorter one, with the pending indicator
still showing. It fails against the old skip path.
Item 89's other half is dropped rather than built. The list churn it described
is a tag-defined view working as intended: a thread that loses `unread` leaves
the Unread view, and the user resolved it by living in the Inbox view instead.
Three designs were drafted before asking and none is worth building.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/mainwindow.h')
0 files changed, 0 insertions, 0 deletions
