Fix NPE with UploadMediaDetails.captionText (#6128)

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Tanmay Gupta 2025-01-15 19:22:35 +05:30 committed by GitHub
parent 76078cf3b5
commit 62136b5b09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View file

@ -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 ?: "",
)
/**

View file

@ -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) }
/**