修复作者、logo可能为空问题

This commit is contained in:
2022-06-19 16:41:05 +08:00
parent a9e45470fa
commit 3bac45c052
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ class MessageHandler(
val selectedMod = handlePagedList(pagedList) { mod -> val selectedMod = handlePagedList(pagedList) { mod ->
PlainText( PlainText(
""" """
[${mod.name}] by ${mod.authors[0].name} [${mod.name}] by ${mod.authors.firstOrNull()?.name}
${formatCount(mod.downloadCount)} Downloads Updated ${mod.dateModified.toLocalDate()} ${formatCount(mod.downloadCount)} Downloads Updated ${mod.dateModified.toLocalDate()}
${mod.summary} ${mod.summary}
${mod.links.websiteUrl} ${mod.links.websiteUrl}

View File

@ -77,7 +77,7 @@ class Mod(
/** /**
* The mod's logo asset * The mod's logo asset
*/ */
val logo: ModAsset, val logo: ModAsset?,
/** /**
* List of screenshots assets * List of screenshots assets