Merge pull request #461 from RyanRory/profile-picture-update-fix

Fix profile picture update
pull/464/head
Niels Andriesse 3 years ago committed by GitHub
commit b6bb9ac902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -154,6 +154,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
override fun onResume() {
super.onResume()
if (TextSecurePreferences.getLocalNumber(this) == null) { return; } // This can be the case after a secondary device is auto-cleared
profileButton.recycle() // clear cached image before update tje profilePictureView
profileButton.update()
val hasViewedSeed = TextSecurePreferences.getHasViewedSeed(this)
if (hasViewedSeed) {

@ -218,6 +218,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
TextSecurePreferences.setProfileAvatarId(this, SecureRandom().nextInt())
ProfileKeyUtil.setEncodedProfileKey(this, encodedProfileKey)
ApplicationContext.getInstance(this).updateOpenGroupProfilePicturesIfNeeded()
profilePictureView.recycle() // clear cached image before update tje profilePictureView
profilePictureView.update()
}
profilePictureToBeUploaded = null

Loading…
Cancel
Save