Skip to content

Commit a665866

Browse files
committed
Workaround text wrap on Oppo, make assets folder.
See react-native#15114 for info. Also applies to OnePlus devices.
1 parent e5870e6 commit a665866

File tree

8 files changed

+8
-7
lines changed

8 files changed

+8
-7
lines changed

TODO

-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@
55
- Handle graceful disconnect when being hit by the OOM killer?
66
- https://reactnative.dev/docs/performance (esp when logging in)
77
- Respect chat message length limits.
8-
- OnePlus 3T titles are wrapped.
98
- Add command history.
File renamed without changes.
File renamed without changes.

src/components/Text.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const Text = (props: React.PropsWithChildren<TextProps>) => (
1313
)
1414

1515
const styles = StyleSheet.create({
16-
darkMode: { color: '#ffffff' },
17-
lightMode: { color: '#000000' }
16+
// https://github.com/facebook/react-native/issues/15114#issuecomment-364458149
17+
darkMode: { color: '#ffffff', fontFamily: '' },
18+
lightMode: { color: '#000000', fontFamily: '' }
1819
})
1920

2021
export default Text

src/globalStyle.ts

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export default StyleSheet.create({
2828
borderBottomWidth: 1,
2929
borderBottomColor: '#121212'
3030
},
31+
iconButtonText: { color: 'white', fontWeight: '600' }, // backgroundColor: 'transparent'
3132
flexSpacer: { flex: 1 }
3233
})

src/screens/ServerScreen.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ const ServerScreen = () => {
291291
onPress={() => setAddServerDialogOpen(true)}
292292
iconStyle={globalStyle.iconStyle}
293293
>
294-
Add
294+
<Text style={globalStyle.iconButtonText}>Add</Text>
295295
</Ionicons.Button>
296296
</View>
297297
<ScrollView
@@ -322,7 +322,7 @@ const ServerScreen = () => {
322322
source={
323323
(ping as Ping).favicon
324324
? { uri: (ping as Ping).favicon }
325-
: require('../pack.png')
325+
: require('../assets/pack.png')
326326
}
327327
style={styles.serverImage}
328328
/>

src/screens/accounts/AccountScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const AccountScreen = () => {
7272
onPress={() => setAddAccountDialogOpen(true)}
7373
iconStyle={globalStyle.iconStyle}
7474
>
75-
Add
75+
<Text style={globalStyle.iconButtonText}>Add</Text>
7676
</Ionicons.Button>
7777
</View>
7878
<View style={globalStyle.outerView}>

src/screens/accounts/AddAccountDialog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const AddAccountDialog = ({
9696
android_ripple={{ color: '#aaa' }}
9797
onPress={() => setMicrosoftLogin(true)}
9898
>
99-
<Image source={require('../../microsoft.png')} />
99+
<Image source={require('../../assets/microsoft.png')} />
100100
<Text style={styles.microsoftButtonText}>Login with Microsoft</Text>
101101
</Pressable>
102102
<TextField

0 commit comments

Comments
 (0)