Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add fallback to email reminder modal (#2193)

* Add fallback to email reminder modal

* Add more debug

authored by

Eric Bailey and committed by
GitHub
b1f9454f bf9cedb6

+17
+9
src/state/session/index.tsx
··· 361 361 } 362 362 363 363 if (canReusePrevSession) { 364 + logger.info(`session: attempting to reuse previous session`) 365 + 364 366 agent.session = prevSession 365 367 __globalAgent = agent 366 368 queryClient.clear() ··· 370 372 resumeSessionWithFreshAccount() 371 373 .then(freshAccount => { 372 374 if (JSON.stringify(account) !== JSON.stringify(freshAccount)) { 375 + logger.info( 376 + `session: reuse of previous session returned a fresh account, upserting`, 377 + ) 373 378 upsertAccount(freshAccount) 374 379 } 375 380 }) ··· 385 390 __globalAgent = PUBLIC_BSKY_AGENT 386 391 }) 387 392 } else { 393 + logger.info(`session: attempting to resume using previous session`) 394 + 388 395 try { 389 396 const freshAccount = await resumeSessionWithFreshAccount() 390 397 __globalAgent = agent ··· 404 411 } 405 412 406 413 async function resumeSessionWithFreshAccount(): Promise<SessionAccount> { 414 + logger.info(`session: resumeSessionWithFreshAccount`) 415 + 407 416 await networkRetry(1, () => agent.resumeSession(prevSession)) 408 417 409 418 /*
+8
src/view/com/modals/VerifyEmail.tsx
··· 22 22 import {useLingui} from '@lingui/react' 23 23 import {useModalControls} from '#/state/modals' 24 24 import {useSession, useSessionApi, getAgent} from '#/state/session' 25 + import {logger} from '#/logger' 25 26 26 27 export const snapPoints = ['90%'] 27 28 ··· 44 45 const [error, setError] = useState<string>('') 45 46 const {isMobile} = useWebMediaQueries() 46 47 const {openModal, closeModal} = useModalControls() 48 + 49 + React.useEffect(() => { 50 + if (!currentAccount) { 51 + logger.error(`VerifyEmail modal opened without currentAccount`) 52 + closeModal() 53 + } 54 + }, [currentAccount, closeModal]) 47 55 48 56 const onSendEmail = async () => { 49 57 setError('')