diff --git a/native/push/in-app-notif.react.js b/native/push/in-app-notif.react.js --- a/native/push/in-app-notif.react.js +++ b/native/push/in-app-notif.react.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import { View, Text, StyleSheet, Platform } from 'react-native'; +import { View, StyleSheet, Platform } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; import { SingleLine } from '../components/single-line.react'; @@ -18,24 +18,22 @@ const useLightStyle = Platform.OS === 'ios' && props.activeTheme !== 'dark'; let title = null; + const textStyle = [ + styles.text, + useLightStyle ? styles.lightText : styles.darkText, + ]; + if (props.title) { title = ( - <> - {props.title} - {'\n'} - + {props.title} ); } - const textStyles = [ - styles.text, - useLightStyle ? styles.lightText : styles.darkText, - ]; const notificationContent = ( - + {title} - {props.message} - + {props.message} + ); if (Platform.OS === 'android') { @@ -62,21 +60,29 @@ justifyContent: 'flex-start', width: '100%', }, - text: { + notificationContent: { ...Platform.select({ ios: { - fontSize: 16, marginTop: 16, marginBottom: 6, - color: 'black', }, default: { - fontSize: 18, marginVertical: 16, }, }), marginHorizontal: 10, }, + text: { + ...Platform.select({ + ios: { + fontSize: 16, + color: 'black', + }, + default: { + fontSize: 18, + }, + }), + }, title: { fontWeight: 'bold', },