1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-09-02 10:57:55 +00:00

Library should not be clickable if spdx is blank

This commit is contained in:
Stypox
2024-11-27 15:46:39 +01:00
parent a25034b898
commit 72f054a4fa

View File

@@ -41,7 +41,7 @@ fun Library(
showLicenseDialog: (licenseFilename: String) -> Unit,
descriptionMaxLines: Int,
) {
val spdxLicense = library.licenses.firstOrNull()?.spdxId
val spdxLicense = library.licenses.firstOrNull()?.spdxId?.takeIf { it.isNotBlank() }
val licenseAssetPath = spdxLicense?.let { SPDX_ID_TO_ASSET_PATH[it] }
val context = LocalContext.current