Addressed PR feedback

This commit is contained in:
Morgan Pretty
2023-05-30 12:43:51 +10:00
parent c77d465438
commit b7744f4f2d
4 changed files with 17 additions and 15 deletions

View File

@@ -69,15 +69,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
return Profile(displayName, profileKey, profilePictureUrl)
}
override fun setUserProfilePictureURL(newValue: String) {
val ourRecipient = fromSerialized(getUserPublicKey()!!).let {
Recipient.from(context, it, false)
}
TextSecurePreferences.setProfilePictureURL(context, newValue)
JobQueue.shared.add(RetrieveProfileAvatarJob(newValue, ourRecipient.address))
}
override fun setProfileAvatar(recipient: Recipient, profileAvatar: String) {
override fun setProfileAvatar(recipient: Recipient, profileAvatar: String?) {
val database = DatabaseComponent.get(context).recipientDatabase()
database.setProfileAvatar(recipient, profileAvatar)
}