Skip to content

Commit a94d40c

Browse files
committed
feat: add CSL path synchronization feature
- Introduced new messages and titles for CSL synchronization in English, Spanish, French, Hindi, Japanese, Korean, Portuguese, Russian, and Chinese translations. - Added storage key for custom CSL paths. - Implemented functionality to manage custom paths, including loading, pruning, and syncing. - Enhanced the CSL store to handle link synchronization progress, including tracking and updating UI states. - Created a new dialog for displaying synchronization progress and status. - Updated CSL management view to support custom path management and synchronization feedback.
1 parent b8780dc commit a94d40c

19 files changed

Lines changed: 2468 additions & 340 deletions

File tree

src-tauri/src/management/airport_flatten.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,9 +1016,8 @@ fn store_airport_flatten_index(
10161016
cache.insert(key, built.clone());
10171017
}
10181018

1019-
persist_airport_flatten_source_files(xplane_root, &built.source_files).map_err(|error| {
1020-
format!("Failed to persist airport flatten index: {}", error)
1021-
})?;
1019+
persist_airport_flatten_source_files(xplane_root, &built.source_files)
1020+
.map_err(|error| format!("Failed to persist airport flatten index: {}", error))?;
10221021

10231022
Ok(())
10241023
}
@@ -1033,7 +1032,11 @@ async fn rebuild_airport_flatten_index(
10331032
.ok()
10341033
.and_then(|cache| cache.get(&key).cloned())
10351034
.map(|cached| cached.source_files)
1036-
.or_else(|| load_persisted_airport_flatten_source_files(xplane_root).ok().flatten())
1035+
.or_else(|| {
1036+
load_persisted_airport_flatten_source_files(xplane_root)
1037+
.ok()
1038+
.flatten()
1039+
})
10371040
.unwrap_or_default();
10381041

10391042
let refreshed_source_files =
@@ -1108,7 +1111,12 @@ fn find_flatten_source_ref_in_index(
11081111
})
11091112
.cloned()
11101113
})
1111-
.or_else(|| index.single_custom_sources_by_folder.get(folder_name).cloned())
1114+
.or_else(|| {
1115+
index
1116+
.single_custom_sources_by_folder
1117+
.get(folder_name)
1118+
.cloned()
1119+
})
11121120
}
11131121
}
11141122
}

0 commit comments

Comments
 (0)