fix: add name update in action bar on modified, change where approvedMe is set
This commit is contained in:
parent
ca7b27f82b
commit
023424a87b
|
@ -585,6 +585,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
|||
updateSubtitle()
|
||||
showOrHideInputIfNeeded()
|
||||
actionBarBinding?.profilePictureView?.update(recipient)
|
||||
actionBarBinding?.conversationTitleView?.text = recipient.toShortString()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,6 +124,14 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
|||
senderAddress
|
||||
}
|
||||
val targetRecipient = Recipient.from(context, targetAddress, false)
|
||||
if (!targetRecipient.isGroupRecipient) {
|
||||
val recipientDb = DatabaseComponent.get(context).recipientDatabase()
|
||||
if (isUserSender) {
|
||||
recipientDb.setApproved(targetRecipient, true)
|
||||
} else {
|
||||
recipientDb.setApprovedMe(targetRecipient, true)
|
||||
}
|
||||
}
|
||||
if (message.isMediaMessage() || attachments.isNotEmpty()) {
|
||||
val quote: Optional<QuoteModel> = if (quotes != null) Optional.of(quotes) else Optional.absent()
|
||||
val linkPreviews: Optional<List<LinkPreview>> = if (linkPreview.isEmpty()) Optional.absent() else Optional.of(linkPreview.mapNotNull { it!! })
|
||||
|
|
|
@ -208,8 +208,6 @@ fun MessageReceiver.handleVisibleMessage(message: VisibleMessage, proto: SignalS
|
|||
profileManager.setUnidentifiedAccessMode(context, recipient, Recipient.UnidentifiedAccessMode.UNKNOWN)
|
||||
profileManager.setProfilePictureURL(context, recipient, profile.profilePictureURL!!)
|
||||
}
|
||||
// set approved on receive message
|
||||
storage.setRecipientApprovedMe(recipient, true)
|
||||
}
|
||||
// Parse quote if needed
|
||||
var quoteModel: QuoteModel? = null
|
||||
|
|
Loading…
Reference in New Issue