mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:07:26 +00:00
[SES-2512] Rewrite ProfilePictureView (#1622)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user