Page MenuHomePhabricator

D6685.id22556.diff
No OneTemporary

D6685.id22556.diff

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,24 @@
const useLightStyle = Platform.OS === 'ios' && props.activeTheme !== 'dark';
let title = null;
+ const textStyle = [
+ styles.text,
+ useLightStyle ? styles.lightText : styles.darkText,
+ ];
+
if (props.title) {
title = (
- <>
- <SingleLine style={styles.title}>{props.title}</SingleLine>
- {'\n'}
- </>
+ <SingleLine style={[styles.title, ...textStyle]}>
+ {props.title}
+ </SingleLine>
);
}
- const textStyles = [
- styles.text,
- useLightStyle ? styles.lightText : styles.darkText,
- ];
const notificationContent = (
- <Text style={textStyles}>
+ <View style={styles.notificationContent}>
{title}
- {props.message}
- </Text>
+ <SingleLine style={textStyle}>{props.message}</SingleLine>
+ </View>
);
if (Platform.OS === 'android') {
@@ -62,21 +62,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',
},

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 19, 8:48 AM (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676415
Default Alt Text
D6685.id22556.diff (1 KB)

Event Timeline