Skip to content

Commit e809e7c

Browse files
bammf1claude
andcommitted
Reload Scholar collections after sync (prevent stale data overwrite)
SyncCompleted handler now calls SetRoot on the Scholar tab, which reloads _allCollections from disk. Previously, in-memory collections stayed stale after sync, and the next auto-save could overwrite the freshly-merged community data with the old in-memory state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 172403d commit e809e7c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎Views/MainWindow.axaml.cs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,18 @@ private void WireChildViewEvents()
16351635
try { await _vm.ReloadStarsAsync(); }
16361636
catch { /* non-critical — star counts stay stale until restart */ }
16371637

1638+
// Reload Scholar collections from disk so synced data appears immediately
1639+
try
1640+
{
1641+
if (_scholarView != null)
1642+
{
1643+
var root = _vm.TranslationRoot ?? _vm.Root ?? "";
1644+
if (!string.IsNullOrWhiteSpace(root))
1645+
_scholarView.SetRoot(root);
1646+
}
1647+
}
1648+
catch { /* non-critical — Scholar stays stale until restart */ }
1649+
16381650
// Background index rebuild — old index stays usable while building
16391651
if (_searchView?.ViewModel.BuildIndexCommand.CanExecute(null) == true)
16401652
{

0 commit comments

Comments
 (0)