Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(notifications/native): fix case for no title notifications

Calin-Teodoreb8b6159eca1
diff --git a/react/features/notifications/components/native/Notification.tsx b/react/features/notifications/components/native/Notification.tsx
index fe27cfdc89..1d3641b720 100644
--- a/react/features/notifications/components/native/Notification.tsx
+++ b/react/features/notifications/components/native/Notification.tsx
@@ -149,7 +149,7 @@ const Notification = ({
const titleText = title || (titleKey && t(titleKey, titleArguments));
const descriptionArray = _getDescription();
- if (descriptionArray?.length) {
+ if (descriptionArray?.length && titleText) {
return (
<>
<Text
@@ -168,15 +168,29 @@ const Notification = ({
}
</>
);
+ } else if (descriptionArray?.length && !titleText) {
+ return (
+ <>
+ {
+ descriptionArray.map((line, index) => (
+ <Text
+ key = { index }
+ style = { styles.contentTextDescription }>
+ { line.length >= CHAR_LIMIT ? line : replaceNonUnicodeEmojis(line) }
+ </Text>
+ ))
+ }
+ </>
+ );
+ } else {
+ return (
+ <Text
+ numberOfLines = { 1 }
+ style = { styles.contentTextTitle as TextStyle }>
+ { titleText }
+ </Text>
+ );
}
-
- return (
- <Text
- numberOfLines = { 1 }
- style = { styles.contentTextTitle as TextStyle }>
- { titleText }
- </Text>
- );
};
return (
diff --git a/react/features/notifications/components/native/styles.ts b/react/features/notifications/components/native/styles.ts
index 1f4c2c1e60..d6815766b5 100644
--- a/react/features/notifications/components/native/styles.ts
+++ b/react/features/notifications/components/native/styles.ts
@@ -49,6 +49,12 @@ export default {
paddingTop: BaseTheme.spacing[1]
},
+ contentTextDescription: {
+ color: BaseTheme.palette.text04,
+ paddingLeft: BaseTheme.spacing[4],
+ paddingTop: BaseTheme.spacing[2]
+ },
+
contentTextTitleDescription: {
color: BaseTheme.palette.text04,
fontWeight: 'bold',