diff --git a/src/components/BlockedGeoOverlay.tsx b/src/components/BlockedGeoOverlay.tsx index 52ea49c3f..e23ffceba 100644 --- a/src/components/BlockedGeoOverlay.tsx +++ b/src/components/BlockedGeoOverlay.tsx @@ -5,7 +5,6 @@ import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {logger} from '#/logger' -import {useDeviceGeolocationApi} from '#/geolocation' import {useEnableSquareButtons} from '#/state/preferences/enable-square-buttons' import {atoms as a, useBreakpoints, useTheme, web} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' @@ -20,6 +19,7 @@ import * as Toast from '#/components/Toast' import {Text} from '#/components/Typography' import {BottomSheetOutlet} from '#/../modules/bottom-sheet' import {IS_WEB} from '#/env' +import {useDeviceGeolocationApi} from '#/geolocation' export function BlockedGeoOverlay() { const t = useTheme() diff --git a/src/components/PostControls/ShareMenu/ShareMenuItems.tsx b/src/components/PostControls/ShareMenu/ShareMenuItems.tsx index 929d9e473..081e5a3b4 100644 --- a/src/components/PostControls/ShareMenu/ShareMenuItems.tsx +++ b/src/components/PostControls/ShareMenu/ShareMenuItems.tsx @@ -1,6 +1,7 @@ import {memo, useMemo} from 'react' import * as ExpoClipboard from 'expo-clipboard' import {AtUri} from '@atproto/api' +import { isIOS } from '@bsky.app/alf' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' diff --git a/src/env/common.ts b/src/env/common.ts index aa5fa73bb..e5e3f1db0 100644 --- a/src/env/common.ts +++ b/src/env/common.ts @@ -126,5 +126,5 @@ export const LIVE_EVENTS_URL = IS_DEV export const ENV_PUBLIC_BSKY_SERVICE: string | undefined = process.env.EXPO_PUBLIC_PUBLIC_BSKY_SERVICE -export const ENV_APPVIEW_DID_PROXY: `did:${string}#bsky_appview` | undefined = +export const ENV_APPVIEW_DID_PROXY: `did:${string}:${string}#bsky_appview` | undefined = process.env.EXPO_PUBLIC_APPVIEW_DID_PROXY \ No newline at end of file diff --git a/src/lib/react-query.tsx b/src/lib/react-query.tsx index 0218d5ee3..44e64fd8f 100644 --- a/src/lib/react-query.tsx +++ b/src/lib/react-query.tsx @@ -10,8 +10,8 @@ import { import type React from 'react' import {listenNetworkConfirmed, listenNetworkLost} from '#/state/events' -import {PUBLIC_BSKY_SERVICE} from './constants' import {IS_NATIVE, IS_WEB} from '#/env' +import {PUBLIC_BSKY_SERVICE} from './constants' declare global { interface Window { diff --git a/src/screens/Messages/components/MessagesList.tsx b/src/screens/Messages/components/MessagesList.tsx index c23353e1d..64dfc8f7c 100644 --- a/src/screens/Messages/components/MessagesList.tsx +++ b/src/screens/Messages/components/MessagesList.tsx @@ -15,6 +15,7 @@ import { AppBskyRichtextFacet, RichText, } from '@atproto/api' +import { isNative } from '@bsky.app/alf' import {useHideBottomBarBorderForScreen} from '#/lib/hooks/useHideBottomBarBorder' import {ScrollProvider} from '#/lib/ScrollContext' diff --git a/src/screens/Profile/Header/Shell.tsx b/src/screens/Profile/Header/Shell.tsx index 147b95763..f195b4701 100644 --- a/src/screens/Profile/Header/Shell.tsx +++ b/src/screens/Profile/Header/Shell.tsx @@ -190,7 +190,7 @@ let ProfileHeaderShell = ({ runOnUI(() => { 'worklet' const rect = measure(bannerRef) - runOnJS(_openLightboxBanner)(banner, rect, 'image') + runOnJS(_openLightboxBanner)(banner, rect) })() } }, [profile.banner, moderation, _openLightboxBanner, bannerRef]) diff --git a/src/screens/Settings/AppIconSettings/useAppIconSets.ts b/src/screens/Settings/AppIconSettings/useAppIconSets.ts index a9cc67974..fbc24133f 100644 --- a/src/screens/Settings/AppIconSettings/useAppIconSets.ts +++ b/src/screens/Settings/AppIconSettings/useAppIconSets.ts @@ -150,7 +150,7 @@ export function useAppIconSets() { return { defaults, - // core, + core: [] as AppIconSet[], } }, [_]) } diff --git a/src/screens/Settings/DeerSettings.tsx b/src/screens/Settings/DeerSettings.tsx index 171b32790..3adea2b36 100644 --- a/src/screens/Settings/DeerSettings.tsx +++ b/src/screens/Settings/DeerSettings.tsx @@ -131,10 +131,30 @@ import {Star_Stroke2_Corner0_Rounded as StarIcon} from '#/components/icons/Star' import {Verified_Stroke2_Corner2_Rounded as VerifiedIcon} from '#/components/icons/Verified' import * as Layout from '#/components/Layout' import {Text} from '#/components/Typography' -import {SearchProfileCard} from '../Search/components/SearchProfileCard' import { IS_WEB } from '#/env/index.web' +import {SearchProfileCard} from '../Search/components/SearchProfileCard' type Props = NativeStackScreenProps +const defaultGateValues = { + alt_share_icon: false, + debug_show_feedcontext: false, + debug_subscriptions: false, + disable_onboarding_find_contacts: false, + disable_settings_find_contacts: false, + explore_show_suggested_feeds: false, + feed_reply_button_open_thread: false, + is_bsky_team_member: false, + disable_live_now_beta: false, + old_postonboarding: false, + onboarding_add_video_feed: false, + onboarding_suggested_starterpacks: false, + remove_show_latest_button: false, + show_composer_prompt: false, + suggested_users_dismiss: false, + test_gate_1: false, + test_gate_2: false +} satisfies Record + function ConstellationInstanceDialog({ control, }: { @@ -467,19 +487,7 @@ export function DeerSettingsScreen({}: Props) { const showLinkInHandle = useShowLinkInHandle() const setShowLinkInHandle = useSetShowLinkInHandle() - const [gates, setGatesView] = useState(Object.assign({ - alt_share_icon: false, - debug_show_feedcontext: false, - debug_subscriptions: false, - explore_show_suggested_feeds: false, - feed_reply_button_open_thread: false, - old_postonboarding: false, - onboarding_add_video_feed: false, - onboarding_suggested_starterpacks: false, - remove_show_latest_button: false, - test_gate_1: false, - test_gate_2: false, - } satisfies Record, Object.fromEntries(useGatesCache()))) + const [gates, setGatesView] = useState(Object.assign(defaultGateValues, Object.fromEntries(useGatesCache()))) const dangerousSetGate = useDangerousSetGate() const setGate = (gate: Gate, value: boolean) => { dangerousSetGate(gate, value) @@ -935,7 +943,7 @@ export function DeerSettingsScreen({}: Props) { label={_(msg`Reset gates`)} onPress={() => { resetDeerGateCache() - setGatesView({}) + setGatesView(defaultGateValues) }} /> diff --git a/src/state/preferences/custom-appview-did.tsx b/src/state/preferences/custom-appview-did.tsx index 634b0088d..3a5f4aa7a 100644 --- a/src/state/preferences/custom-appview-did.tsx +++ b/src/state/preferences/custom-appview-did.tsx @@ -17,5 +17,5 @@ export function readCustomAppViewDidUri() { return undefined } - return `${maybeDid}#bsky_appview` as `did:${string}#bsky_appview` + return `${maybeDid}#bsky_appview` as `did:${string}:${string}#bsky_appview` } diff --git a/src/state/queries/constellation.ts b/src/state/queries/constellation.ts index 07267239c..d30b15940 100644 --- a/src/state/queries/constellation.ts +++ b/src/state/queries/constellation.ts @@ -1,5 +1,5 @@ export type ConstellationLink = { - did: `did:${string}` + did: `did:${string}:${string}` collection: string rkey: string } diff --git a/src/state/queries/deer-verification.ts b/src/state/queries/deer-verification.ts index 1a7170020..ffc1c2789 100644 --- a/src/state/queries/deer-verification.ts +++ b/src/state/queries/deer-verification.ts @@ -53,8 +53,8 @@ export function getTrustedConstellationVerifications( from_dids: Array.from(trusted), }) return asyncGenDedupe( - asyncGenFilter(verificationLinks, ({did}) => trusted.has(did)), - ({did}) => did, + asyncGenFilter(verificationLinks, (link) => trusted.has(link.did)), + (link) => link.did, ) } @@ -78,11 +78,9 @@ async function getDeerVerificationLinkedRecords( // - clear the promise from the lru on failure // - skip links that cause errors async link => { - const {did, rkey} = link + let service = await resolvePdsServiceUrl(link.did) - let service = await resolvePdsServiceUrl(did) - - const request = `${service}/xrpc/com.atproto.repo.getRecord?repo=${did}&collection=app.bsky.graph.verification&rkey=${rkey}` + const request = `${service}/xrpc/com.atproto.repo.getRecord?repo=${did}&collection=app.bsky.graph.verification&rkey=${link.rkey}` const record = await verificationCache.getOrTryInsertWith( request, async () => { diff --git a/src/state/queries/direct-fetch-record.ts b/src/state/queries/direct-fetch-record.ts index bae65ec01..16622628c 100644 --- a/src/state/queries/direct-fetch-record.ts +++ b/src/state/queries/direct-fetch-record.ts @@ -27,7 +27,7 @@ export async function directFetchRecordAndProfile( const res = await agent.resolveHandle({ handle: urip.host, }) - urip.host = res.data.did + urip.host = res.data.did as `did:${string}:${string}` } try { diff --git a/src/view/com/modals/UserAddRemoveLists.tsx b/src/view/com/modals/UserAddRemoveLists.tsx index 84201e826..32bd01279 100644 --- a/src/view/com/modals/UserAddRemoveLists.tsx +++ b/src/view/com/modals/UserAddRemoveLists.tsx @@ -14,7 +14,6 @@ import {sanitizeDisplayName} from '#/lib/strings/display-names' import {cleanError} from '#/lib/strings/errors' import {sanitizeHandle} from '#/lib/strings/handles' import {s} from '#/lib/styles' -import {useTheme} from '#/alf' import {useModalControls} from '#/state/modals' import { getMembership, @@ -24,6 +23,7 @@ import { useListMembershipRemoveMutation, } from '#/state/queries/list-memberships' import {useSession} from '#/state/session' +import {useTheme} from '#/alf' import {IS_ANDROID, IS_WEB, IS_WEB_MOBILE} from '#/env' import {MyLists} from '../lists/MyLists' import {Button} from '../util/forms/Button' @@ -229,7 +229,7 @@ function ListItem({ {isProcessing || typeof membership === 'undefined' ? ( - + ) : (