Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix link preview not showing

ammarahm-ed6d80dcbc02f5
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js b/apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js
index 1b5d5e153..ffd5dde02 100644
--- a/apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js
+++ b/apps/mobile/src/views/Editor/tiny/toolbar/linkpreview.js
@@ -90,16 +90,15 @@ const LinkPreview = ({setMode, value, onSubmit}) => {
</Heading>
)}
- {description ||
- (title && (
- <Paragraph
- style={{flexWrap: 'wrap', maxWidth: '90%', paddingLeft: 5}}
- numberOfLines={2}
- color={colors.icon}
- size={SIZE.xs}>
- {description ? description : link.value}
- </Paragraph>
- ))}
+ {description || title ? (
+ <Paragraph
+ style={{flexWrap: 'wrap', maxWidth: '90%', paddingLeft: 5}}
+ numberOfLines={2}
+ color={colors.icon}
+ size={SIZE.xs}>
+ {description ? description : link.value}
+ </Paragraph>
+ ) : null}
<View
style={{
@@ -108,7 +107,7 @@ const LinkPreview = ({setMode, value, onSubmit}) => {
justifyContent: 'space-between',
width: '100%',
}}>
- {!title && !description && (
+ {!title && !description ? (
<Paragraph
onPress={openLink}
style={{
@@ -117,7 +116,8 @@ const LinkPreview = ({setMode, value, onSubmit}) => {
}}>
{value}
</Paragraph>
- )}
+ ) : null}
+
<View
style={{
flexDirection: 'row',