Skip to content

Folder rows freeze at their initial state: no live progress bar, current file or queued state #151

Description

@gnacho

Bug description

The folder rows in the main window never update after they are first painted. While a sync runs, the row does not show the spinner, the slim run progress bar, the current file being transferred or the queued state of the other folders. Switching to another account and back rebuilds the view, which paints the current state once - so the rows always look stale until that manual refresh.

Steps to reproduce

  1. Configure an account with at least one sync folder.
  2. Copy new files into the local folder (or wait for a scheduled sync) with the main window open.
  3. Watch the folder row while the engine runs.

Expected behavior

Each row should follow its folder in real time: spinner and progress bar while syncing, the name of the file being transferred, the queued state while another folder holds the sync permit, and the synchronized state with its timestamp when the run finishes.

Actual behavior

The row keeps whatever state it had when the view was built. The sync itself runs fine in the background (files do reach the server); only the view is blind.

Root cause (already diagnosed)

AccountView::new builds one FolderStatusRow per folder, appends its slot widget to the list and then drops the row object at the end of the loop iteration. Since the fix for #121, Drop for FolderStatusRow unsubscribes its state and progress callbacks, so every row loses its live subscriptions immediately after construction. Before that change the dropped row kept its subscriptions alive (a leak, but the rows updated).

The view must own the row objects for their whole visible lifetime so the subscriptions stay active while the row is on screen and are still released when the view is rebuilt.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions