Media.kt: Property would not be serialized into a 'Parcel'. Added '@IgnoredOnParcel' annotation to remove the warning

This commit is contained in:
Junwei Bai 2024-10-18 00:47:51 +11:00
parent 4ebb00ef72
commit b7c9520ed8

View file

@ -3,6 +3,7 @@ package fr.free.nrw.commons
import android.os.Parcelable import android.os.Parcelable
import fr.free.nrw.commons.location.LatLng import fr.free.nrw.commons.location.LatLng
import fr.free.nrw.commons.wikidata.model.page.PageTitle import fr.free.nrw.commons.wikidata.model.page.PageTitle
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import java.util.Date import java.util.Date
import java.util.Locale import java.util.Locale
@ -124,6 +125,7 @@ class Media constructor(
* Gets the categories the file falls under. * Gets the categories the file falls under.
* @return file categories as an ArrayList of Strings * @return file categories as an ArrayList of Strings
*/ */
@IgnoredOnParcel
var addedCategories: List<String>? = null var addedCategories: List<String>? = null
// TODO added categories should be removed. It is added for a short fix. On category update, // TODO added categories should be removed. It is added for a short fix. On category update,
// categories should be re-fetched instead // categories should be re-fetched instead