Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

fix: type errors & linting #39

merged opened by shi.gg targeting main

a

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:irs2tcoeuvuwj3m4yampbuco/sh.tangled.repo.pull/3mcppjxjk6b22
+39 -31
Diff #0
+1 -1
src/components/BlockedGeoOverlay.tsx
··· 5 5 import {useLingui} from '@lingui/react' 6 6 7 7 import {logger} from '#/logger' 8 - import {useDeviceGeolocationApi} from '#/geolocation' 9 8 import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' 10 9 import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' 11 10 import {Button, ButtonIcon, ButtonText} from '#/components/Button' ··· 20 19 import {Text} from '#/components/Typography' 21 20 import {BottomSheetOutlet} from '#/../modules/bottom-sheet' 22 21 import {IS_WEB} from '#/env' 22 + import {useDeviceGeolocationApi} from '#/geolocation' 23 23 24 24 export function BlockedGeoOverlay() { 25 25 const t = useTheme()
+1
src/components/PostControls/ShareMenu/ShareMenuItems.tsx
··· 1 1 import {memo, useMemo} from 'react' 2 2 import * as ExpoClipboard from 'expo-clipboard' 3 3 import {AtUri} from '@atproto/api' 4 + import { isIOS } from '@bsky.app/alf' 4 5 import {msg, Trans} from '@lingui/macro' 5 6 import {useLingui} from '@lingui/react' 6 7 import {useNavigation} from '@react-navigation/native'
+1 -1
src/env/common.ts
··· 126 126 127 127 export const ENV_PUBLIC_BSKY_SERVICE: string | undefined = 128 128 process.env.EXPO_PUBLIC_PUBLIC_BSKY_SERVICE 129 - export const ENV_APPVIEW_DID_PROXY: `did:${string}#bsky_appview` | undefined = 129 + export const ENV_APPVIEW_DID_PROXY: `did:${string}:${string}#bsky_appview` | undefined = 130 130 process.env.EXPO_PUBLIC_APPVIEW_DID_PROXY
+1 -1
src/lib/react-query.tsx
··· 10 10 import type React from 'react' 11 11 12 12 import {listenNetworkConfirmed, listenNetworkLost} from '#/state/events' 13 - import {PUBLIC_BSKY_SERVICE} from './constants' 14 13 import {IS_NATIVE, IS_WEB} from '#/env' 14 + import {PUBLIC_BSKY_SERVICE} from './constants' 15 15 16 16 declare global { 17 17 interface Window {
+1
src/screens/Messages/components/MessagesList.tsx
··· 15 15 AppBskyRichtextFacet, 16 16 RichText, 17 17 } from '@atproto/api' 18 + import { isNative } from '@bsky.app/alf' 18 19 19 20 import {useHideBottomBarBorderForScreen} from '#/lib/hooks/useHideBottomBarBorder' 20 21 import {ScrollProvider} from '#/lib/ScrollContext'
+1 -1
src/screens/Profile/Header/Shell.tsx
··· 190 190 runOnUI(() => { 191 191 'worklet' 192 192 const rect = measure(bannerRef) 193 - runOnJS(_openLightboxBanner)(banner, rect, 'image') 193 + runOnJS(_openLightboxBanner)(banner, rect) 194 194 })() 195 195 } 196 196 }, [profile.banner, moderation, _openLightboxBanner, bannerRef])
+1 -1
src/screens/Settings/AppIconSettings/useAppIconSets.ts
··· 150 150 151 151 return { 152 152 defaults, 153 - // core, 153 + core: [] as AppIconSet[], 154 154 } 155 155 }, [_]) 156 156 }
+23 -15
src/screens/Settings/DeerSettings.tsx
··· 131 131 import {Verified_Stroke2_Corner2_Rounded as VerifiedIcon} from '#/components/icons/Verified' 132 132 import * as Layout from '#/components/Layout' 133 133 import {Text} from '#/components/Typography' 134 - import {SearchProfileCard} from '../Search/components/SearchProfileCard' 135 134 import { IS_WEB } from '#/env/index.web' 135 + import {SearchProfileCard} from '../Search/components/SearchProfileCard' 136 136 type Props = NativeStackScreenProps<CommonNavigatorParams> 137 137 138 + const defaultGateValues = { 139 + alt_share_icon: false, 140 + debug_show_feedcontext: false, 141 + debug_subscriptions: false, 142 + disable_onboarding_find_contacts: false, 143 + disable_settings_find_contacts: false, 144 + explore_show_suggested_feeds: false, 145 + feed_reply_button_open_thread: false, 146 + is_bsky_team_member: false, 147 + disable_live_now_beta: false, 148 + old_postonboarding: false, 149 + onboarding_add_video_feed: false, 150 + onboarding_suggested_starterpacks: false, 151 + remove_show_latest_button: false, 152 + show_composer_prompt: false, 153 + suggested_users_dismiss: false, 154 + test_gate_1: false, 155 + test_gate_2: false 156 + } satisfies Record<Gate, false> 157 + 138 158 function ConstellationInstanceDialog({ 139 159 control, 140 160 }: { ··· 467 487 const showLinkInHandle = useShowLinkInHandle() 468 488 const setShowLinkInHandle = useSetShowLinkInHandle() 469 489 470 - const [gates, setGatesView] = useState(Object.assign({ 471 - alt_share_icon: false, 472 - debug_show_feedcontext: false, 473 - debug_subscriptions: false, 474 - explore_show_suggested_feeds: false, 475 - feed_reply_button_open_thread: false, 476 - old_postonboarding: false, 477 - onboarding_add_video_feed: false, 478 - onboarding_suggested_starterpacks: false, 479 - remove_show_latest_button: false, 480 - test_gate_1: false, 481 - test_gate_2: false, 482 - } satisfies Record<Gate, false>, Object.fromEntries(useGatesCache()))) 490 + const [gates, setGatesView] = useState(Object.assign(defaultGateValues, Object.fromEntries(useGatesCache()))) 483 491 const dangerousSetGate = useDangerousSetGate() 484 492 const setGate = (gate: Gate, value: boolean) => { 485 493 dangerousSetGate(gate, value) ··· 935 943 label={_(msg`Reset gates`)} 936 944 onPress={() => { 937 945 resetDeerGateCache() 938 - setGatesView({}) 946 + setGatesView(defaultGateValues) 939 947 }} 940 948 /> 941 949 </SettingsList.Group>
+1 -1
src/state/preferences/custom-appview-did.tsx
··· 17 17 return undefined 18 18 } 19 19 20 - return `${maybeDid}#bsky_appview` as `did:${string}#bsky_appview` 20 + return `${maybeDid}#bsky_appview` as `did:${string}:${string}#bsky_appview` 21 21 }
+1 -1
src/state/queries/constellation.ts
··· 1 1 export type ConstellationLink = { 2 - did: `did:${string}` 2 + did: `did:${string}:${string}` 3 3 collection: string 4 4 rkey: string 5 5 }
+4 -6
src/state/queries/deer-verification.ts
··· 53 53 from_dids: Array.from(trusted), 54 54 }) 55 55 return asyncGenDedupe( 56 - asyncGenFilter(verificationLinks, ({did}) => trusted.has(did)), 57 - ({did}) => did, 56 + asyncGenFilter(verificationLinks, (link) => trusted.has(link.did)), 57 + (link) => link.did, 58 58 ) 59 59 } 60 60 ··· 78 78 // - clear the promise from the lru on failure 79 79 // - skip links that cause errors 80 80 async link => { 81 - const {did, rkey} = link 81 + let service = await resolvePdsServiceUrl(link.did) 82 82 83 - let service = await resolvePdsServiceUrl(did) 84 - 85 - const request = `${service}/xrpc/com.atproto.repo.getRecord?repo=${did}&collection=app.bsky.graph.verification&rkey=${rkey}` 83 + const request = `${service}/xrpc/com.atproto.repo.getRecord?repo=${did}&collection=app.bsky.graph.verification&rkey=${link.rkey}` 86 84 const record = await verificationCache.getOrTryInsertWith( 87 85 request, 88 86 async () => {
+1 -1
src/state/queries/direct-fetch-record.ts
··· 27 27 const res = await agent.resolveHandle({ 28 28 handle: urip.host, 29 29 }) 30 - urip.host = res.data.did 30 + urip.host = res.data.did as `did:${string}:${string}` 31 31 } 32 32 33 33 try {
+2 -2
src/view/com/modals/UserAddRemoveLists.tsx
··· 14 14 import {cleanError} from '#/lib/strings/errors' 15 15 import {sanitizeHandle} from '#/lib/strings/handles' 16 16 import {s} from '#/lib/styles' 17 - import {useTheme} from '#/alf' 18 17 import {useModalControls} from '#/state/modals' 19 18 import { 20 19 getMembership, ··· 24 23 useListMembershipRemoveMutation, 25 24 } from '#/state/queries/list-memberships' 26 25 import {useSession} from '#/state/session' 26 + import {useTheme} from '#/alf' 27 27 import {IS_ANDROID, IS_WEB, IS_WEB_MOBILE} from '#/env' 28 28 import {MyLists} from '../lists/MyLists' 29 29 import {Button} from '../util/forms/Button' ··· 229 229 </View> 230 230 <View> 231 231 {isProcessing || typeof membership === 'undefined' ? ( 232 - <ActivityIndicator color={t.palette.primary_500} /> 232 + <ActivityIndicator color={t.palette.contrast_500} /> 233 233 ) : ( 234 234 <Button 235 235 testID={`user-${handle}-addBtn`}

History

1 round 0 comments
sign up or login to add to the discussion
shi.gg submitted #0
expand 0 comments
pull request successfully merged