Fix replies bug

pull/347/head
Niels Andriesse 4 years ago
parent b8f82c98eb
commit 28d34b0187

@ -155,8 +155,6 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate,
} }
private func autoGenerateLinkPreviewIfPossible() { private func autoGenerateLinkPreviewIfPossible() {
additionalContentContainer.subviews.forEach { $0.removeFromSuperview() }
quoteDraftInfo = nil
// Suggest that the user enable link previews if they haven't already and we haven't // Suggest that the user enable link previews if they haven't already and we haven't
// told them about link previews yet // told them about link previews yet
let text = inputTextView.text! let text = inputTextView.text!
@ -180,6 +178,9 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate,
} }
// Guard against obsolete updates // Guard against obsolete updates
guard linkPreviewURL != self.linkPreviewInfo?.url else { return } guard linkPreviewURL != self.linkPreviewInfo?.url else { return }
// Clear content container
additionalContentContainer.subviews.forEach { $0.removeFromSuperview() }
quoteDraftInfo = nil
// Set the state to loading // Set the state to loading
linkPreviewInfo = (url: linkPreviewURL, draft: nil) linkPreviewInfo = (url: linkPreviewURL, draft: nil)
linkPreviewView.linkPreviewState = LinkPreviewLoading() linkPreviewView.linkPreviewState = LinkPreviewLoading()

Loading…
Cancel
Save