Skip to content

Commit 4eb6ecd

Browse files
committed
Fix crash in MessagePreviewView
1 parent 19e63dc commit 4eb6ecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/org/thunderdog/challegram/component/chat/MessagePreviewView.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ public void setUseAvatarFallback (boolean useAvatarFallback) {
343343
private final ReplaceAnimator<TextEntry> titleText = new ReplaceAnimator<>(ignored -> invalidate(), AnimatorUtils.DECELERATE_INTERPOLATOR, 180l);
344344
private final ReplaceAnimator<TextEntry> contentText = new ReplaceAnimator<>(ignored -> invalidate(), AnimatorUtils.DECELERATE_INTERPOLATOR, 180l);
345345
private final ReplaceAnimator<MediaEntry> mediaPreview = new ReplaceAnimator<>(ignored -> {
346-
buildText(true);
346+
if (data != null) {
347+
buildText(true);
348+
}
347349
invalidate();
348350
}, AnimatorUtils.DECELERATE_INTERPOLATOR, 180l);
349351
private final BoolAnimator showSmallMedia = new BoolAnimator(this, AnimatorUtils.DECELERATE_INTERPOLATOR, 180l);

0 commit comments

Comments
 (0)