fix: unlinking local mrpack does not show content afterwards (#6541)

This commit is contained in:
Calum H.
2026-06-29 11:58:43 +00:00
committed by GitHub
parent b95a2d875a
commit cee25fdbbc
@@ -207,7 +207,7 @@ pub(crate) async fn list_content(
&state.pool, &state.pool,
) )
.await?; .await?;
let imported_modpack_scope = is_imported_modpack_scope(&resolved, &link); let imported_modpack_scope = is_imported_modpack_scope(&link);
let linked_modpack_source_kind = linked_modpack_source_kind(&link); let linked_modpack_source_kind = linked_modpack_source_kind(&link);
let mut failed_modpack_identifier_lookup = false; let mut failed_modpack_identifier_lookup = false;
let modpack_ids = if imported_modpack_scope { let modpack_ids = if imported_modpack_scope {
@@ -283,7 +283,7 @@ pub(crate) async fn list_linked_modpack_content(
&state.pool, &state.pool,
) )
.await?; .await?;
if is_imported_modpack_scope(&resolved, &link) { if is_imported_modpack_scope(&link) {
let files = content_projects_for_scope( let files = content_projects_for_scope(
&resolved, &resolved,
cache_behaviour, cache_behaviour,
@@ -1072,12 +1072,8 @@ fn file_metadata_from_entry_or_cache(
}) })
} }
fn is_imported_modpack_scope( fn is_imported_modpack_scope(link: &InstanceLink) -> bool {
resolved: &ResolvedContentScope, matches!(link, InstanceLink::ImportedModpack { .. })
link: &InstanceLink,
) -> bool {
resolved.content_set.source_kind == ContentSourceKind::ImportedModpack
|| matches!(link, InstanceLink::ImportedModpack { .. })
} }
async fn linked_modpack_ids_for_instance( async fn linked_modpack_ids_for_instance(