feat(modpacks): check discovered pack updates

This commit is contained in:
objz committed 2026-08-04 21:32:25 +02:00
1 parent f049904466
commit 695ba5a758
25 files changed
+191 -38

No files matched your search

+4 -11
View File
@@ -1399,7 +1399,10 @@ async fn load_provider_metadata(
)
.await
{
Ok(versions) => has_newer_compatible_version(&versions, &installed.version_id),
Ok(versions) => crate::instance::content::provider::has_newer_compatible_version(
&versions,
&installed.version_id,
),
Err(error) => {
tracing::debug!("Could not check updates for project '{project_id}': {error}");
false
@@ -1428,16 +1431,6 @@ async fn load_provider_metadata(
Ok((bytes, project.description, update_available))
}
fn has_newer_compatible_version(
versions: &[crate::net::modrinth::VersionInfo],
installed_version_id: &str,
) -> bool {
versions
.iter()
.position(|version| version.id == installed_version_id)
.is_some_and(|position| position > 0)
}
pub fn handle_key_no_toggle(key_event: &KeyEvent, state: &mut ContentListState) -> bool {
handle_key_inner(key_event, state, false)
}