Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/core/account_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ impl FolderRuntime {
// cannot repaint the row.
let run_active = std::rc::Rc::new(std::cell::Cell::new(false));
self.scheduler.set_run_active(run_active.clone());
// Issue #148: startup syncs begin before connect_progress() wires the
// forwarder, so the flag would stay false for the entire first run and
// the UI would show no per-file progress. Seed it from the scheduler
// state when connecting, so an in-flight run keeps emitting events.
if self.scheduler.is_running() {
run_active.set(true);
}
glib::spawn_future_local(async move {
while let Ok(progress) = progress_rx.recv().await {
if !run_active.get() {
Expand Down
12 changes: 11 additions & 1 deletion src/ui/folder_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ impl FolderStatusRow {
let spinner = this.spinner.clone();
let progress_bar = this.progress_bar.clone();
let row = this.row.clone();
let slot = this.slot.clone();
let remote_path = this.remote_path.clone();
let format_last_sync = this.format_last_sync.clone();
let subscription = controller.subscribe(move |snapshot: &StateSnapshot| {
Expand All @@ -408,6 +409,11 @@ impl FolderStatusRow {
format_last_sync.as_ref().map(|f| f()),
snapshot,
);
// Issue #150: GTK may not repaint the row when properties
// are updated from a subscription callback. Force a redraw
// of the whole slot so state, spinner, bar and caption all
// update together.
slot.queue_draw();
});
this._subscription = Some(subscription);
// Live per-file progress (issue #86). Only the widgets are
Expand All @@ -422,8 +428,12 @@ impl FolderStatusRow {
.unwrap_or_else(|| progress.path.clone());
progress_label.set_text(&progress_line_text(progress, &file));
progress_label.set_visible(true);
progress_label.queue_draw();
}
_ => {
progress_label.set_visible(false);
progress_label.queue_draw();
}
_ => progress_label.set_visible(false),
});
this._progress_subscription = Some(progress_subscription);
}
Expand Down
Loading