mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(notifications/native): fix case for no title notifications
This commit is contained in:
committed by
Calinteodor
parent
f9d8feacd2
commit
eb8b6159ec
@@ -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 (
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user