Wait for acknowledgment before sending the next project update

This commit is contained in:
Antonio Scandurra 2022-11-14 15:32:49 +01:00
parent 65c5adff05
commit 40073f6100
11 changed files with 94 additions and 208 deletions

View file

@ -1051,25 +1051,6 @@ impl LocalWorktree {
pub fn is_shared(&self) -> bool {
self.share.is_some()
}
pub fn send_extension_counts(&self, project_id: u64) {
let mut extensions = Vec::new();
let mut counts = Vec::new();
for (extension, count) in self.extension_counts() {
extensions.push(extension.to_string_lossy().to_string());
counts.push(*count as u32);
}
self.client
.send(proto::UpdateWorktreeExtensions {
project_id,
worktree_id: self.id().to_proto(),
extensions,
counts,
})
.log_err();
}
}
impl RemoteWorktree {