[SES-2512] Rewrite ProfilePictureView (#1622)

This commit is contained in:
Fanchao Liu
2024-08-19 17:32:30 +10:00
committed by GitHub
parent 6701cb1dc1
commit 9919f716a7
25 changed files with 251 additions and 391 deletions

View File

@@ -3,10 +3,12 @@ package org.session.libsession.avatars
import com.bumptech.glide.load.Key
import java.security.MessageDigest
class PlaceholderAvatarPhoto(val hashString: String,
val displayName: String): Key {
data class PlaceholderAvatarPhoto(
val hashString: String,
val displayName: String?
) : Key {
override fun updateDiskCacheKey(messageDigest: MessageDigest) {
messageDigest.update(hashString.encodeToByteArray())
messageDigest.update(displayName.encodeToByteArray())
messageDigest.update(displayName?.encodeToByteArray() ?: byteArrayOf())
}
}