Show the folder picker on the platform that needs it most, and upload at once
Two faults, both of my own making, reported from the tablet as "I cannot select a location" and "it does not upload". **The picker button was gated on `target-selected == 1`.** That index was Remote's position while both targets were offered. Making the target list platform-aware narrowed Android's to Remote alone, so Remote became index 0 and the button disappeared — on the one platform where the picker is the *only* way to set a destination, since a device folder is not reachable there at all. It is gated on a boolean derived from the target now. An index into a list whose length varies is not a fact about the target, and writing it as one is what made a correct change break the thing it was meant to fix. **A queued export waited for a sync pass.** Staging first is deliberate — an export is finished on disk the moment it is written, and offline is then just a longer queue — but nothing drained the outbox until the next sync, so "Queued for Exports" sat unchanged and read, fairly, as an upload that never happened. A finished batch that wrote anything now drains immediately. The sync-pass drain stays: the first makes an upload feel immediate, the second is what eventually delivers the exports made in a tunnel. Committed without the parallel session's in-flight collection work, which is mid-save and does not compile; verified by stashing it and building this tree alone. 281 dr-ui tests pass, clippy clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -889,6 +889,11 @@ pub fn drain_batch(
|
||||
rx: Receiver<BatchMessage>,
|
||||
total: usize,
|
||||
reporting: Reporting,
|
||||
// Run when the batch finishes having written something. A queued export
|
||||
// is finished on disk but not where the user asked for it, and waiting
|
||||
// for the next sync pass to notice reads — correctly — as an export that
|
||||
// did not upload.
|
||||
on_exported: impl Fn() + 'static,
|
||||
) {
|
||||
let job = activity.begin(
|
||||
crate::activity::Kind::Export,
|
||||
@@ -958,6 +963,9 @@ pub fn drain_batch(
|
||||
job.finish(text.clone());
|
||||
}
|
||||
settle(&w, reporting, &text);
|
||||
if exported > 0 {
|
||||
on_exported();
|
||||
}
|
||||
stop_timer(&held);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user