Fix issue where quote view would display base64 encoded text story.

fork-5.53.8
Alex Hart 2022-10-06 12:53:34 -03:00 zatwierdzone przez Greyson Parrelli
rodzic 14e8f5cf98
commit 0d94794ece
1 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -305,12 +305,11 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
missingStoryReaction.setVisibility(View.GONE); missingStoryReaction.setVisibility(View.GONE);
} }
boolean isTextStory = !attachments.containsMediaSlide() && isStoryReply(); StoryTextPostModel textPostModel = isStoryReply() ? getStoryTextPost(body) : null;
if (!TextUtils.isEmpty(body) || !attachments.containsMediaSlide()) { if (!TextUtils.isEmpty(body) || !attachments.containsMediaSlide()) {
if (isTextStory && body != null) { if (textPostModel != null) {
try { try {
bodyView.setText(getStoryTextPost(body).getText()); bodyView.setText(textPostModel.getText());
} catch (Exception e) { } catch (Exception e) {
Log.w(TAG, "Could not parse body of text post.", e); Log.w(TAG, "Could not parse body of text post.", e);
bodyView.setText(""); bodyView.setText("");
@ -365,8 +364,8 @@ public class QuoteView extends FrameLayout implements RecipientForeverObserver {
mainView.setMinimumHeight(isStoryReply() && originalMissing ? 0 : thumbHeight); mainView.setMinimumHeight(isStoryReply() && originalMissing ? 0 : thumbHeight);
thumbnailView.setPadding(0, 0, 0, 0); thumbnailView.setPadding(0, 0, 0, 0);
if (!attachments.containsMediaSlide() && isStoryReply()) { StoryTextPostModel model = isStoryReply() ? getStoryTextPost(body) : null;
StoryTextPostModel model = getStoryTextPost(body); if (model != null) {
attachmentVideoOverlayView.setVisibility(GONE); attachmentVideoOverlayView.setVisibility(GONE);
attachmentContainerView.setVisibility(GONE); attachmentContainerView.setVisibility(GONE);
thumbnailView.setVisibility(VISIBLE); thumbnailView.setVisibility(VISIBLE);