mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Fix NPE with UploadMediaDetails.captionText (#6128)
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
76078cf3b5
commit
62136b5b09
5 changed files with 7 additions and 7 deletions
|
|
@ -23,14 +23,14 @@ data class UploadMediaDetail(
|
|||
* The caption text for the item being uploaded.
|
||||
* @param captionText The caption text.
|
||||
*/
|
||||
var captionText: String? = "",
|
||||
var captionText: String = "",
|
||||
) : Parcelable {
|
||||
fun javaCopy() = copy()
|
||||
|
||||
constructor(place: Place?) : this(
|
||||
place?.language,
|
||||
place?.longDescription,
|
||||
place?.name,
|
||||
place?.name ?: "",
|
||||
)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class CategoriesPresenter
|
|||
*/
|
||||
private fun getImageTitleList(): List<String> =
|
||||
repository.getUploads()
|
||||
.map { it.uploadMediaDetails[0].captionText!! }
|
||||
.map { it.uploadMediaDetails[0].captionText }
|
||||
.filterNot { TextUtils.isEmpty(it) }
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue