Bluesky app fork with some witchin' additions 馃挮 witchsky.app
bluesky fork client
119
fork

Configure Feed

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

at a876aae44ea07494ebea9727350aa060b81f317b 44 lines 1.3 kB view raw
1import {msg} from '@lingui/core/macro' 2import {useLingui} from '@lingui/react' 3import {Trans} from '@lingui/react/macro' 4 5import * as SettingsList from '#/screens/Settings/components/SettingsList' 6import * as Toggle from '#/components/forms/Toggle' 7import {Live_Stroke2_Corner0_Rounded as LiveIcon} from '#/components/icons/Live' 8import { 9 useLiveEventPreferences, 10 useUpdateLiveEventPreferences, 11} from '#/features/liveEvents/preferences' 12 13export function LiveEventFeedsSettingsToggle() { 14 const {_} = useLingui() 15 const {data: prefs} = useLiveEventPreferences() 16 const { 17 isPending, 18 data: updatedPrefs, 19 mutate: update, 20 } = useUpdateLiveEventPreferences({ 21 metricContext: 'settings', 22 }) 23 const hideAllFeeds = !!(updatedPrefs || prefs)?.hideAllFeeds 24 25 return ( 26 <Toggle.Item 27 name="enable_live_event_banner" 28 label={_(msg`Show live events in your Discover Feed`)} 29 value={!hideAllFeeds} 30 onChange={() => { 31 if (!isPending) { 32 update({type: 'toggleHideAllFeeds'}) 33 } 34 }}> 35 <SettingsList.Item> 36 <SettingsList.ItemIcon icon={LiveIcon} /> 37 <SettingsList.ItemText> 38 <Trans>Show live events in your Discover Feed</Trans> 39 </SettingsList.ItemText> 40 <Toggle.Platform /> 41 </SettingsList.Item> 42 </Toggle.Item> 43 ) 44}