Merge pull request #1463 from bemusementpark/fix-multi-preview

[SES-1732] Fix multiple link previews
This commit is contained in:
Andrew 2024-04-24 11:48:04 +09:30 committed by GitHub
commit 569d0c23a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,7 +180,7 @@ class InputBar : RelativeLayout, InputBarEditTextDelegate, QuoteViewDelegate, Li
// message we'll bail early if a link preview View already exists and just let
// `updateLinkPreview` get called to update the existing View.
if (linkPreview != null && linkPreviewDraftView != null) return
linkPreviewDraftView?.let(binding.inputBarAdditionalContentContainer::removeView)
linkPreviewDraftView = LinkPreviewDraftView(context).also { it.delegate = this }
// Add the link preview View. Note: If there's already a quote View in the 'additional