fix(settings): keep editor updates consistent

This commit is contained in:
objz committed 2026-09-04 23:54:38 +02:00
1 parent ccc09419fb
commit 31edc0dbf8
13 files changed
+743 -248

No files matched your search

+7 -5
View File
@@ -151,11 +151,13 @@ async fn reconcile(job: ReconcileJob, task: &ProgressTask) -> ReconcileResult {
let paths = InstancePaths::new(instances_dir.join(&instance_name));
let manifest_path = paths.content_manifest();
let minecraft_dir = paths.minecraft();
let retry_hours = crate::config::SETTINGS.read().content.unmatched_retry_hours;
let max_fingerprint_size_mib = crate::config::SETTINGS
.read()
.content
.max_fingerprint_size_mib;
let (retry_hours, max_fingerprint_size_mib) = {
let settings = crate::config::SETTINGS.read();
(
settings.content.unmatched_retry_hours,
settings.content.max_fingerprint_size_mib,
)
};
let inventory_progress = task.handle();
let inventory_minecraft_dir = minecraft_dir.clone();
let inventory = tokio::task::spawn_blocking(move || {
+1 -3
View File
@@ -55,9 +55,7 @@ pub async fn prepare(
instance: &InstanceConfig,
target: VersionInfo,
) -> Result<RefreshPlan, String> {
if crate::instance::runtime::get(&instance.name)
.is_some_and(|state| !matches!(state, crate::instance::runtime::RunState::Crashed(_)))
{
if crate::instance::runtime::is_active(&instance.name) {
return Err("Stop the instance before changing its modpack".to_owned());
}
let source = instance
+1 -3
View File
@@ -27,6 +27,4 @@ pub use content::{
pub use launch::LaunchError;
pub use loader::{GameVersion, ModLoaderInstaller, VanillaInstaller, get_installer};
pub use manager::{InstanceError, InstanceManager};
pub use models::{
InstanceConfig, LaunchCommand, ModLoader, WindowMode, memory_kib, normalize_memory_value,
};
pub use models::{InstanceConfig, ModLoader, WindowMode, normalize_memory_value};