From 5e92770eb867037e4e875022ae1434c40228461d Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 2 Jan 2021 14:43:15 -0500 Subject: [PATCH] Automatically rebuild working set after sync --- taskchampion/src/replica.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/taskchampion/src/replica.rs b/taskchampion/src/replica.rs index a463ee6cd..7c3df1e30 100644 --- a/taskchampion/src/replica.rs +++ b/taskchampion/src/replica.rs @@ -165,9 +165,12 @@ impl Replica { Ok(()) } - /// Synchronize this replica against the given server. + /// Synchronize this replica against the given server. The working set is rebuilt after + /// this occurs, but without renumbering, so any newly-pending tasks should appear in + /// the working set. pub fn sync(&mut self, server: &mut Box) -> Fallible<()> { - self.taskdb.sync(server) + self.taskdb.sync(server)?; + self.rebuild_working_set(false) } /// Rebuild this replica's working set, based on whether tasks are pending or not. If