Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3488021
D6685.id22556.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6685.id22556.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D6685: [native] [ENG-2207] Too big notifications when the message is long
Attached
Detach File
Event Timeline
Log In to Comment