Skip to content

Commit 0693a7d

Browse files
committed
Added default value in useUserPreferences
1 parent 6250fd7 commit 0693a7d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/containers/markdown/components/mentions/AtMention.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface IAtMention {
2020

2121
const AtMention = React.memo(({ mention, mentions, username, navToRoomInfo, style = [], useRealName }: IAtMention) => {
2222
const { theme } = useTheme();
23-
const [mentionsWithAtSymbol] = useUserPreferences<boolean>(USER_MENTIONS_PREFERENCES_KEY);
23+
const [mentionsWithAtSymbol] = useUserPreferences<boolean>(USER_MENTIONS_PREFERENCES_KEY, true);
2424
const preffix = mentionsWithAtSymbol ? '@' : '';
2525
if (mention === 'all' || mention === 'here') {
2626
return (

app/containers/markdown/components/mentions/Hashtag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface IHashtag {
2424

2525
const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IHashtag) => {
2626
const { theme } = useTheme();
27-
const [roomsWithHashTagSymbol] = useUserPreferences<boolean>(ROOM_MENTIONS_PREFERENCES_KEY);
27+
const [roomsWithHashTagSymbol] = useUserPreferences<boolean>(ROOM_MENTIONS_PREFERENCES_KEY, true);
2828
const isMasterDetail = useAppSelector(state => state.app.isMasterDetail);
2929
const preffix = roomsWithHashTagSymbol ? '#' : '';
3030
const handlePress = async () => {

app/views/AccessibilityAndAppearanceView/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export type TAlertDisplayType = 'TOAST' | 'DIALOG';
2323
const AccessibilityAndAppearanceView = () => {
2424
const navigation = useNavigation<NativeStackNavigationProp<AccessibilityStackParamList>>();
2525
const isMasterDetail = useAppSelector(state => state.app.isMasterDetail as boolean);
26-
const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences<boolean>(USER_MENTIONS_PREFERENCES_KEY);
27-
const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences<boolean>(ROOM_MENTIONS_PREFERENCES_KEY);
26+
const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences<boolean>(USER_MENTIONS_PREFERENCES_KEY, true);
27+
const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences<boolean>(ROOM_MENTIONS_PREFERENCES_KEY, true);
2828
const [autoplayGifs, setAutoplayGifs] = useUserPreferences<boolean>(AUTOPLAY_GIFS_PREFERENCES_KEY, true);
2929
const [alertDisplayType, setAlertDisplayType] = useUserPreferences<TAlertDisplayType>(
3030
ALERT_DISPLAY_TYPE_PREFERENCES_KEY,

0 commit comments

Comments
 (0)