change chat settings icon to a gear icon (#8192)

This commit is contained in:
Samuel Newman
2025-04-14 20:13:09 +03:00
committed by GitHub
parent f8bd850465
commit 2e73464fd1
+16 -16
View File
@@ -1,15 +1,15 @@
import {useCallback, useEffect, useMemo, useState} from 'react' import {useCallback, useEffect, useMemo, useState} from 'react'
import {View} from 'react-native' import {View} from 'react-native'
import {useAnimatedRef} from 'react-native-reanimated' import {useAnimatedRef} from 'react-native-reanimated'
import {ChatBskyActorDefs, ChatBskyConvoDefs} from '@atproto/api' import {type ChatBskyActorDefs, type ChatBskyConvoDefs} from '@atproto/api'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useFocusEffect, useIsFocused} from '@react-navigation/native' import {useFocusEffect, useIsFocused} from '@react-navigation/native'
import {NativeStackScreenProps} from '@react-navigation/native-stack' import {type NativeStackScreenProps} from '@react-navigation/native-stack'
import {useAppState} from '#/lib/hooks/useAppState' import {useAppState} from '#/lib/hooks/useAppState'
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
import {MessagesTabNavigatorParams} from '#/lib/routes/types' import {type MessagesTabNavigatorParams} from '#/lib/routes/types'
import {cleanError} from '#/lib/strings/errors' import {cleanError} from '#/lib/strings/errors'
import {logger} from '#/logger' import {logger} from '#/logger'
import {isNative} from '#/platform/detection' import {isNative} from '#/platform/detection'
@@ -19,18 +19,18 @@ import {useMessagesEventBus} from '#/state/messages/events'
import {useLeftConvos} from '#/state/queries/messages/leave-conversation' import {useLeftConvos} from '#/state/queries/messages/leave-conversation'
import {useListConvosQuery} from '#/state/queries/messages/list-conversations' import {useListConvosQuery} from '#/state/queries/messages/list-conversations'
import {useSession} from '#/state/session' import {useSession} from '#/state/session'
import {List, ListRef} from '#/view/com/util/List' import {List, type ListRef} from '#/view/com/util/List'
import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder' import {ChatListLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {atoms as a, useBreakpoints, useTheme} from '#/alf'
import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import {DialogControlProps, useDialogControl} from '#/components/Dialog' import {type DialogControlProps, useDialogControl} from '#/components/Dialog'
import {NewChat} from '#/components/dms/dialogs/NewChatDialog' import {NewChat} from '#/components/dms/dialogs/NewChatDialog'
import {useRefreshOnFocus} from '#/components/hooks/useRefreshOnFocus' import {useRefreshOnFocus} from '#/components/hooks/useRefreshOnFocus'
import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as Retry} from '#/components/icons/ArrowRotateCounterClockwise' import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as RetryIcon} from '#/components/icons/ArrowRotateCounterClockwise'
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
import {Message_Stroke2_Corner0_Rounded as Message} from '#/components/icons/Message' import {Message_Stroke2_Corner0_Rounded as MessageIcon} from '#/components/icons/Message'
import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' import {PlusLarge_Stroke2_Corner0_Rounded as PlusIcon} from '#/components/icons/Plus'
import {SettingsSliderVertical_Stroke2_Corner0_Rounded as SettingsSlider} from '#/components/icons/SettingsSlider' import {SettingsGear2_Stroke2_Corner0_Rounded as SettingsIcon} from '#/components/icons/SettingsGear2'
import * as Layout from '#/components/Layout' import * as Layout from '#/components/Layout'
import {Link} from '#/components/Link' import {Link} from '#/components/Link'
import {ListFooter} from '#/components/Lists' import {ListFooter} from '#/components/Lists'
@@ -223,7 +223,7 @@ export function MessagesScreen({navigation, route}: Props) {
{isError ? ( {isError ? (
<> <>
<View style={[a.pt_3xl, a.align_center]}> <View style={[a.pt_3xl, a.align_center]}>
<CircleInfo <CircleInfoIcon
width={48} width={48}
fill={t.atoms.text_contrast_low.color} fill={t.atoms.text_contrast_low.color}
/> />
@@ -252,14 +252,14 @@ export function MessagesScreen({navigation, route}: Props) {
<ButtonText> <ButtonText>
<Trans>Retry</Trans> <Trans>Retry</Trans>
</ButtonText> </ButtonText>
<ButtonIcon icon={Retry} position="right" /> <ButtonIcon icon={RetryIcon} position="right" />
</Button> </Button>
</View> </View>
</> </>
) : ( ) : (
<> <>
<View style={[a.pt_3xl, a.align_center]}> <View style={[a.pt_3xl, a.align_center]}>
<Message width={48} fill={t.palette.primary_500} /> <MessageIcon width={48} fill={t.palette.primary_500} />
<Text style={[a.pt_md, a.pb_sm, a.text_2xl, a.font_bold]}> <Text style={[a.pt_md, a.pb_sm, a.text_2xl, a.font_bold]}>
<Trans>Nothing here</Trans> <Trans>Nothing here</Trans>
</Text> </Text>
@@ -329,9 +329,9 @@ function Header({newChatControl}: {newChatControl: DialogControlProps}) {
size="small" size="small"
variant="ghost" variant="ghost"
color="secondary" color="secondary"
shape="square" shape="round"
style={[a.justify_center]}> style={[a.justify_center]}>
<ButtonIcon icon={SettingsSlider} size="md" /> <ButtonIcon icon={SettingsIcon} size="lg" />
</Link> </Link>
) )
@@ -353,7 +353,7 @@ function Header({newChatControl}: {newChatControl: DialogControlProps}) {
size="small" size="small"
variant="solid" variant="solid"
onPress={newChatControl.open}> onPress={newChatControl.open}>
<ButtonIcon icon={Plus} position="left" /> <ButtonIcon icon={PlusIcon} position="left" />
<ButtonText> <ButtonText>
<Trans>New chat</Trans> <Trans>New chat</Trans>
</ButtonText> </ButtonText>