|
1 | 1 | import {Dimensions, Pressable, TouchableOpacity, View} from 'react-native'; |
2 | 2 | import {StyleSheet} from 'react-native-unistyles'; |
| 3 | +import {useMMKVNumber} from 'react-native-mmkv'; |
3 | 4 | import {observer} from 'mobx-react-lite'; |
4 | 5 |
|
5 | 6 | import {formatRelative} from 'date-fns/formatRelative'; |
@@ -29,6 +30,8 @@ export const RegularMessage = observer((props: MessageProps) => { |
29 | 30 | const locale = settings.get('ui.messaging.use24H') ? enGB : enUS; |
30 | 31 | const mentionsUser = props.message.mention_ids?.includes(client.user?._id!); |
31 | 32 |
|
| 33 | + const [fontSize = settings.getDefault('ui.messaging.fontSize') as unknown as number] = useMMKVNumber('ui.messaging.fontSize'); |
| 34 | + |
32 | 35 | // check for invite links, then take the code from each |
33 | 36 | const rawInvites = Array.from( |
34 | 37 | props.message.content?.matchAll(RE_INVITE) ?? [], |
@@ -165,7 +168,7 @@ export const RegularMessage = observer((props: MessageProps) => { |
165 | 168 | style={[ |
166 | 169 | localStyles.editIndicator, |
167 | 170 | { |
168 | | - fontSize: 12, |
| 171 | + fontSize: fontSize - 2, |
169 | 172 | right: 48, |
170 | 173 | marginBottom: -16, |
171 | 174 | }, |
@@ -201,7 +204,7 @@ export const RegularMessage = observer((props: MessageProps) => { |
201 | 204 | style={[ |
202 | 205 | localStyles.editIndicator, |
203 | 206 | { |
204 | | - fontSize: 12, |
| 207 | + fontSize: fontSize - 2, |
205 | 208 | top: 2, |
206 | 209 | left: 2, |
207 | 210 | }, |
@@ -317,7 +320,7 @@ const localStyles = StyleSheet.create(currentTheme => ({ |
317 | 320 | paddingLeft: 10, |
318 | 321 | }, |
319 | 322 | timestamp: { |
320 | | - fontSize: 12, |
| 323 | + fontSize: (settings.get('ui.messaging.fontSize') as number) - 2, |
321 | 324 | color: currentTheme.foregroundTertiary, |
322 | 325 | position: 'relative', |
323 | 326 | top: 2, |
|
0 commit comments