Merge branch 'main' into chore/16KB-page-size-compatibility

This commit is contained in:
Nicolas Raoul 2025-10-05 22:15:56 +09:00 committed by GitHub
commit 9a8f6dc99e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View file

@ -39,4 +39,11 @@ data class Folder(
return true
}
override fun hashCode(): Int {
var result = bucketId.hashCode()
result = 31 * result + name.hashCode()
result = 31 * result + images.hashCode()
return result
}
}

View file

@ -1,6 +1,7 @@
package fr.free.nrw.commons.customselector.model
import android.net.Uri
import android.os.Build
import android.os.Parcel
import android.os.Parcelable
@ -48,7 +49,12 @@ data class Image(
this(
parcel.readLong(),
parcel.readString()!!,
parcel.readParcelable(Uri::class.java.classLoader)!!,
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
parcel.readParcelable(Uri::class.java.classLoader, Uri::class.java)!!
} else {
@Suppress("DEPRECATION")
parcel.readParcelable(Uri::class.java.classLoader)!!
},
parcel.readString()!!,
parcel.readLong(),
parcel.readString()!!,
@ -121,4 +127,16 @@ data class Image(
override fun newArray(size: Int): Array<Image?> = arrayOfNulls(size)
}
override fun hashCode(): Int {
var result = id.hashCode()
result = 31 * result + bucketId.hashCode()
result = 31 * result + name.hashCode()
result = 31 * result + uri.hashCode()
result = 31 * result + path.hashCode()
result = 31 * result + bucketName.hashCode()
result = 31 * result + sha1.hashCode()
result = 31 * result + date.hashCode()
return result
}
}