mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor syncback process and improve code readability
- Reformatted the `SYNCBACK_SERVICES` list for better readability by aligning entries vertically. - Simplified the `performSyncback` function by removing unnecessary Promise wrapping, enhancing clarity and maintainability. - Updated the `NotConnectedPage` component to improve the structure of button elements and their associated tooltips. - Refactored the `hydrate` and `matching` modules to streamline function calls and improve code organization. These changes enhance the overall readability and maintainability of the syncback process and related components.
This commit is contained in:
parent
372a422b3d
commit
93ea0bdef6
16 changed files with 546 additions and 375 deletions
|
|
@ -505,8 +505,10 @@ pub fn make_rbxl_from_chunks(chunks: &[librojo::web_api::ServiceChunk]) -> Vec<u
|
|||
let chunk_dom = rbx_binary::from_reader(Cursor::new(&chunk.data))
|
||||
.unwrap_or_else(|e| panic!("Failed to parse rbxm for {}: {e}", chunk.class_name));
|
||||
|
||||
let service_ref =
|
||||
dom.insert(root_ref, rbx_dom_weak::InstanceBuilder::new(&chunk.class_name));
|
||||
let service_ref = dom.insert(
|
||||
root_ref,
|
||||
rbx_dom_weak::InstanceBuilder::new(&chunk.class_name),
|
||||
);
|
||||
|
||||
let mut ref_map: HashMap<Ref, Ref> = HashMap::new();
|
||||
for &child_ref in chunk_dom.root().children() {
|
||||
|
|
@ -554,10 +556,8 @@ pub fn make_rbxl_from_chunks(chunks: &[librojo::web_api::ServiceChunk]) -> Vec<u
|
|||
"VoiceChatService",
|
||||
"Workspace",
|
||||
];
|
||||
let existing: std::collections::HashSet<String> = chunks
|
||||
.iter()
|
||||
.map(|c| c.class_name.clone())
|
||||
.collect();
|
||||
let existing: std::collections::HashSet<String> =
|
||||
chunks.iter().map(|c| c.class_name.clone()).collect();
|
||||
for &svc in &visible_services {
|
||||
if !existing.contains(svc) {
|
||||
dom.insert(root_ref, rbx_dom_weak::InstanceBuilder::new(svc));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue