Skip to content

Commit 959338a

Browse files
committed
code improvements
1 parent 13f1cf8 commit 959338a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/views/AccessibilityAndAppearanceView/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as HeaderButton from '../../containers/Header/components/HeaderButton';
77
import * as List from '../../containers/List';
88
import SafeAreaView from '../../containers/SafeAreaView';
99
import I18n from '../../i18n';
10-
import { isIOS } from '../../lib/methods/helpers';
1110
import { type AccessibilityStackParamList } from '../../stacks/types';
1211
import { useAppSelector } from '../../lib/hooks/useAppSelector';
1312
import { useUserPreferences } from '../../lib/methods/userPreferences';
@@ -89,23 +88,23 @@ const AccessibilityAndAppearanceView = () => {
8988
title='Autoplay_gifs'
9089
right={renderAutoplayGifs}
9190
onPress={toggleAutoplayGifs}
92-
accessibilityRole={isIOS ? 'switch' : 'none'}
91+
accessibilityRole='switch'
9392
/>
9493
<List.Separator />
9594
<List.Item
9695
testID='accessibility-mentions-with-at-symbol-switch'
9796
title='Mentions_With_@_Symbol'
9897
right={renderMentionsWithAtSymbolSwitch}
9998
onPress={toggleMentionsWithAtSymbol}
100-
accessibilityRole={isIOS ? 'switch' : 'none'}
99+
accessibilityRole='switch'
101100
/>
102101
<List.Separator />
103102
<List.Item
104103
testID='accessibility-rooms-with-hashtag-symbol-switch'
105104
title='Rooms_With_#_Symbol'
106105
right={renderRoomsWithHashTagSwitch}
107106
onPress={toggleRoomsWithHashTag}
108-
accessibilityRole={isIOS ? 'switch' : 'none'}
107+
accessibilityRole='switch'
109108
/>
110109
<List.Separator />
111110
</List.Section>

app/views/DisplayPrefsView.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import I18n from '../i18n';
1515
import { type SettingsStackParamList } from '../stacks/types';
1616
import { useTheme } from '../theme';
1717
import { events, logEvent } from '../lib/methods/helpers/log';
18-
import { isIOS } from '../lib/methods/helpers';
1918
import { saveSortPreference } from '../lib/methods/userPreferencesMethods';
2019
import { useAppSelector } from '../lib/hooks/useAppSelector';
2120

@@ -120,7 +119,7 @@ const DisplayPrefsView = (): React.ReactElement => {
120119
testID='display-pref-view-avatars'
121120
right={() => renderAvatarSwitch(showAvatar)}
122121
additionalAccessibilityLabel={showAvatar}
123-
accessibilityRole={isIOS ? 'switch' : 'none'}
122+
accessibilityRole='switch'
124123
/>
125124
<List.Separator />
126125
</List.Section>

0 commit comments

Comments
 (0)