Bluesky app fork with some witchin' additions ๐Ÿ’ซ
0
fork

Configure Feed

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

[๐Ÿด] Suspend event bus when switching accounts (#4190)

* Suspend event bus when switching accounts

* Make effect symmetrical

authored by

Eric Bailey and committed by
GitHub
2c6c9069 efdcfd09

+4 -5
+4 -5
src/state/messages/events/index.tsx
··· 1 1 import React from 'react' 2 2 import {AppState} from 'react-native' 3 3 4 - import {isWeb} from '#/platform/detection' 5 4 import {MessagesEventBus} from '#/state/messages/events/agent' 6 5 import {useAgent} from '#/state/session' 7 - import {IS_DEV} from '#/env' 8 6 9 7 const MessagesEventBusContext = React.createContext<MessagesEventBus | null>( 10 8 null, ··· 32 30 ) 33 31 34 32 React.useEffect(() => { 35 - if (isWeb && IS_DEV) { 36 - // @ts-ignore 37 - window.bus = bus 33 + bus.resume() 34 + 35 + return () => { 36 + bus.suspend() 38 37 } 39 38 }, [bus]) 40 39