From 0693a7d0c6071c940f2bb2dc4ec8911231aadf70 Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Dec 2025 19:25:56 +0530 Subject: [PATCH 1/3] Added default value in useUserPreferences --- app/containers/markdown/components/mentions/AtMention.tsx | 2 +- app/containers/markdown/components/mentions/Hashtag.tsx | 2 +- app/views/AccessibilityAndAppearanceView/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/containers/markdown/components/mentions/AtMention.tsx b/app/containers/markdown/components/mentions/AtMention.tsx index df9dd3b33d6..70a9dbd7472 100644 --- a/app/containers/markdown/components/mentions/AtMention.tsx +++ b/app/containers/markdown/components/mentions/AtMention.tsx @@ -20,7 +20,7 @@ interface IAtMention { const AtMention = React.memo(({ mention, mentions, username, navToRoomInfo, style = [], useRealName }: IAtMention) => { const { theme } = useTheme(); - const [mentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY); + const [mentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, true); const preffix = mentionsWithAtSymbol ? '@' : ''; if (mention === 'all' || mention === 'here') { return ( diff --git a/app/containers/markdown/components/mentions/Hashtag.tsx b/app/containers/markdown/components/mentions/Hashtag.tsx index 4013d236487..18c5579f71e 100644 --- a/app/containers/markdown/components/mentions/Hashtag.tsx +++ b/app/containers/markdown/components/mentions/Hashtag.tsx @@ -24,7 +24,7 @@ interface IHashtag { const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IHashtag) => { const { theme } = useTheme(); - const [roomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY); + const [roomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, true); const isMasterDetail = useAppSelector(state => state.app.isMasterDetail); const preffix = roomsWithHashTagSymbol ? '#' : ''; const handlePress = async () => { diff --git a/app/views/AccessibilityAndAppearanceView/index.tsx b/app/views/AccessibilityAndAppearanceView/index.tsx index de018f4975c..d1e29af98a3 100644 --- a/app/views/AccessibilityAndAppearanceView/index.tsx +++ b/app/views/AccessibilityAndAppearanceView/index.tsx @@ -23,8 +23,8 @@ export type TAlertDisplayType = 'TOAST' | 'DIALOG'; const AccessibilityAndAppearanceView = () => { const navigation = useNavigation>(); const isMasterDetail = useAppSelector(state => state.app.isMasterDetail as boolean); - const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY); - const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY); + const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, true); + const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, true); const [autoplayGifs, setAutoplayGifs] = useUserPreferences(AUTOPLAY_GIFS_PREFERENCES_KEY, true); const [alertDisplayType, setAlertDisplayType] = useUserPreferences( ALERT_DISPLAY_TYPE_PREFERENCES_KEY, From 36d08d6e6d252f4e31a7ae7e46c54edaa047a56f Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:03:38 +0530 Subject: [PATCH 2/3] it was false ;-; --- app/containers/markdown/components/mentions/AtMention.tsx | 2 +- app/containers/markdown/components/mentions/Hashtag.tsx | 2 +- app/views/AccessibilityAndAppearanceView/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/containers/markdown/components/mentions/AtMention.tsx b/app/containers/markdown/components/mentions/AtMention.tsx index 70a9dbd7472..cf0779c0343 100644 --- a/app/containers/markdown/components/mentions/AtMention.tsx +++ b/app/containers/markdown/components/mentions/AtMention.tsx @@ -20,7 +20,7 @@ interface IAtMention { const AtMention = React.memo(({ mention, mentions, username, navToRoomInfo, style = [], useRealName }: IAtMention) => { const { theme } = useTheme(); - const [mentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, true); + const [mentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, false); const preffix = mentionsWithAtSymbol ? '@' : ''; if (mention === 'all' || mention === 'here') { return ( diff --git a/app/containers/markdown/components/mentions/Hashtag.tsx b/app/containers/markdown/components/mentions/Hashtag.tsx index 18c5579f71e..c5d8ffff7ee 100644 --- a/app/containers/markdown/components/mentions/Hashtag.tsx +++ b/app/containers/markdown/components/mentions/Hashtag.tsx @@ -24,7 +24,7 @@ interface IHashtag { const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IHashtag) => { const { theme } = useTheme(); - const [roomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, true); + const [roomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, false); const isMasterDetail = useAppSelector(state => state.app.isMasterDetail); const preffix = roomsWithHashTagSymbol ? '#' : ''; const handlePress = async () => { diff --git a/app/views/AccessibilityAndAppearanceView/index.tsx b/app/views/AccessibilityAndAppearanceView/index.tsx index d1e29af98a3..da71ce1ba85 100644 --- a/app/views/AccessibilityAndAppearanceView/index.tsx +++ b/app/views/AccessibilityAndAppearanceView/index.tsx @@ -23,8 +23,8 @@ export type TAlertDisplayType = 'TOAST' | 'DIALOG'; const AccessibilityAndAppearanceView = () => { const navigation = useNavigation>(); const isMasterDetail = useAppSelector(state => state.app.isMasterDetail as boolean); - const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, true); - const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, true); + const [mentionsWithAtSymbol, setMentionsWithAtSymbol] = useUserPreferences(USER_MENTIONS_PREFERENCES_KEY, false); + const [roomsWithHashTagSymbol, setRoomsWithHashTagSymbol] = useUserPreferences(ROOM_MENTIONS_PREFERENCES_KEY, false); const [autoplayGifs, setAutoplayGifs] = useUserPreferences(AUTOPLAY_GIFS_PREFERENCES_KEY, true); const [alertDisplayType, setAlertDisplayType] = useUserPreferences( ALERT_DISPLAY_TYPE_PREFERENCES_KEY, From 1c9ec4968edeaa2287db64392246c15a9204961e Mon Sep 17 00:00:00 2001 From: Rohit Bansal <40559587+Rohit3523@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:04:31 +0530 Subject: [PATCH 3/3] added for auto play image --- app/containers/ImageViewer/ImageViewer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/containers/ImageViewer/ImageViewer.tsx b/app/containers/ImageViewer/ImageViewer.tsx index 38813a8aa11..802597ed354 100644 --- a/app/containers/ImageViewer/ImageViewer.tsx +++ b/app/containers/ImageViewer/ImageViewer.tsx @@ -30,7 +30,7 @@ const styles = StyleSheet.create({ }); export const ImageViewer = ({ uri = '', width, height, ...props }: ImageViewerProps): React.ReactElement => { - const [autoplayGifs] = useUserPreferences(AUTOPLAY_GIFS_PREFERENCES_KEY); + const [autoplayGifs] = useUserPreferences(AUTOPLAY_GIFS_PREFERENCES_KEY, true); const [isPlaying, setIsPlaying] = useState(!!autoplayGifs); const expoImageRef = useRef(null);