mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
fix: unlinking local mrpack does not show content afterwards (#6541)
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user