Bluesky app fork with some witchin' additions 💫

remove location stuff for now

-83
-83
src/screens/Settings/DeerSettings.tsx
··· 14 14 useGatesCache, 15 15 } from '#/lib/statsig/statsig' 16 16 import {isWeb} from '#/platform/detection' 17 - import {setGeolocation, useGeolocation} from '#/state/geolocation' 18 17 import * as persisted from '#/state/persisted' 19 18 import {useGoLinksEnabled, useSetGoLinksEnabled} from '#/state/preferences' 20 19 import { ··· 69 68 import {Atom_Stroke2_Corner0_Rounded as DeerIcon} from '#/components/icons/Atom' 70 69 import {Bell_Stroke2_Corner0_Rounded as BellIcon} from '#/components/icons/Bell' 71 70 import {Eye_Stroke2_Corner0_Rounded as VisibilityIcon} from '#/components/icons/Eye' 72 - import {Earth_Stroke2_Corner2_Rounded as GlobeIcon} from '#/components/icons/Globe' 73 71 import {Lab_Stroke2_Corner0_Rounded as BeakerIcon} from '#/components/icons/Lab' 74 72 import {PaintRoller_Stroke2_Corner2_Rounded as PaintRollerIcon} from '#/components/icons/PaintRoller' 75 73 import {RaisingHand4Finger_Stroke2_Corner0_Rounded as RaisingHandIcon} from '#/components/icons/RaisingHand' ··· 81 79 82 80 type Props = NativeStackScreenProps<CommonNavigatorParams> 83 81 84 - function GeolocationSettingsDialog({ 85 - control, 86 - }: { 87 - control: Dialog.DialogControlProps 88 - }) { 89 - const pal = usePalette('default') 90 - const {_} = useLingui() 91 - 92 - const [hasChanged, setHasChanged] = useState(false) 93 - const [countryCode, setCountryCode] = useState('') 94 - 95 - const submit = () => { 96 - setGeolocation({countryCode}) 97 - control.close() 98 - } 99 - 100 - return ( 101 - <Dialog.Outer control={control} nativeOptions={{preventExpansion: true}}> 102 - <Dialog.Handle /> 103 - <Dialog.ScrollableInner label={_(msg`Geolocation ISO 3166-1 Code`)}> 104 - <View style={[a.gap_sm, a.pb_lg]}> 105 - <Text style={[a.text_2xl, a.font_bold]}> 106 - <Trans>Geolocation ISO 3166-1 Code</Trans> 107 - </Text> 108 - </View> 109 - 110 - <View style={a.gap_lg}> 111 - <Dialog.Input 112 - label="Text input field" 113 - autoFocus 114 - style={[styles.textInput, pal.border, pal.text]} 115 - value={countryCode} 116 - onChangeText={value => { 117 - setCountryCode(value.toUpperCase()) 118 - setHasChanged(true) 119 - }} 120 - maxLength={2} 121 - placeholder="BR" 122 - placeholderTextColor={pal.colors.textLight} 123 - onSubmitEditing={submit} 124 - accessibilityHint={_( 125 - msg`Input 2 letter ISO 3166-1 country code to use as location`, 126 - )} 127 - /> 128 - 129 - <View style={isWeb && [a.flex_row, a.justify_end]}> 130 - <Button 131 - label={hasChanged ? _(msg`Save location`) : _(msg`Done`)} 132 - size="large" 133 - onPress={submit} 134 - variant="solid" 135 - color="primary"> 136 - <ButtonText> 137 - {hasChanged ? <Trans>Save</Trans> : <Trans>Done</Trans>} 138 - </ButtonText> 139 - </Button> 140 - </View> 141 - </View> 142 - 143 - <Dialog.Close /> 144 - </Dialog.ScrollableInner> 145 - </Dialog.Outer> 146 - ) 147 - } 148 - 149 82 function ConstellationInstanceDialog({ 150 83 control, 151 84 }: { ··· 269 202 270 203 const hideFollowNotifications = useHideFollowNotifications() 271 204 const setHideFollowNotifications = useSetHideFollowNotifications() 272 - 273 - const location = useGeolocation() 274 - const setLocationControl = Dialog.useDialogControl() 275 205 276 206 const constellationInstance = useConstellationInstance() 277 207 const setConstellationInstanceControl = Dialog.useDialogControl() ··· 424 354 </SettingsList.Item> 425 355 426 356 <SettingsList.Item> 427 - <SettingsList.ItemIcon icon={GlobeIcon} /> 428 - <SettingsList.ItemText> 429 - <Trans>{`ISO 3166-1 Location (currently ${ 430 - location.geolocation?.countryCode ?? '?' 431 - })`}</Trans> 432 - </SettingsList.ItemText> 433 - <SettingsList.BadgeButton 434 - label={_(msg`Change`)} 435 - onPress={() => setLocationControl.open()} 436 - /> 437 - </SettingsList.Item> 438 - <SettingsList.Item> 439 357 <Admonition type="info" style={[a.flex_1]}> 440 358 <Trans> 441 359 Geolocation country code informs required regional app labelers ··· 602 520 </SettingsList.Item> 603 521 </SettingsList.Container> 604 522 </Layout.Content> 605 - <GeolocationSettingsDialog control={setLocationControl} /> 606 523 <ConstellationInstanceDialog control={setConstellationInstanceControl} /> 607 524 </Layout.Screen> 608 525 )