mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-24 06:35:39 +00:00
Skip empty AppliedPatchSets for sending changes.
This commit is contained in:
@@ -154,7 +154,9 @@ impl JobThreadContext {
|
|||||||
|
|
||||||
for id in affected_ids {
|
for id in affected_ids {
|
||||||
if let Some(patch) = compute_and_apply_changes(&mut tree, &self.vfs, id) {
|
if let Some(patch) = compute_and_apply_changes(&mut tree, &self.vfs, id) {
|
||||||
applied_patches.push(patch);
|
if !patch.is_empty() {
|
||||||
|
applied_patches.push(patch);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +255,9 @@ impl JobThreadContext {
|
|||||||
apply_patch_set(&mut tree, patch_set)
|
apply_patch_set(&mut tree, patch_set)
|
||||||
};
|
};
|
||||||
|
|
||||||
self.message_queue.push_messages(&[applied_patch]);
|
if !applied_patch.is_empty() {
|
||||||
|
self.message_queue.push_messages(&[applied_patch]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pub struct PatchSet {
|
|||||||
pub updated_instances: Vec<PatchUpdate>,
|
pub updated_instances: Vec<PatchUpdate>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> PatchSet {
|
impl PatchSet {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
PatchSet {
|
PatchSet {
|
||||||
removed_instances: Vec::new(),
|
removed_instances: Vec::new(),
|
||||||
@@ -76,6 +76,10 @@ impl AppliedPatchSet {
|
|||||||
updated: Vec::new(),
|
updated: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.removed.is_empty() && self.added.is_empty() && self.updated.is_empty()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
|||||||
Reference in New Issue
Block a user