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
- Configure an account with at least one sync folder.
- Copy new files into the local folder (or wait for a scheduled sync) with the main window open.
- 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
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
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