mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
fix: only update and fetch a new profile pic if it's actually different from our current one
This commit is contained in:
parent
1ecc87da76
commit
85c1d38bb4
@ -122,7 +122,7 @@ object MultiDeviceProtocol {
|
||||
val profileKey = Base64.encodeBytes(configurationMessage.profileKey)
|
||||
ProfileKeyUtil.setEncodedProfileKey(context, profileKey)
|
||||
recipientDatabase.setProfileKey(ourRecipient, configurationMessage.profileKey)
|
||||
if (!configurationMessage.profilePicture.isNullOrEmpty()) {
|
||||
if (!configurationMessage.profilePicture.isNullOrEmpty() && TextSecurePreferences.getProfilePictureURL(context) != configurationMessage.profilePicture) {
|
||||
TextSecurePreferences.setProfilePictureURL(context, configurationMessage.profilePicture)
|
||||
TextSecurePreferences.setProfileAvatarId(context, SecureRandom().nextInt())
|
||||
ApplicationContext.getInstance(context).jobManager.add(RetrieveProfileAvatarJob(ourRecipient, configurationMessage.profilePicture))
|
||||
|
Loading…
Reference in New Issue
Block a user