Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Merge branch 'liby-bugfix/desktop-web-text-link-media-query-issue' into main

+13 -16
+3 -3
src/view/com/posts/FeedItem.tsx
··· 9 9 } from '@fortawesome/react-native-fontawesome' 10 10 import {PostsFeedItemModel} from 'state/models/feeds/post' 11 11 import {FeedSourceInfo} from 'lib/api/feed/types' 12 - import {Link, DesktopWebTextLink} from '../util/Link' 12 + import {Link, TextLinkOnWebOnly} from '../util/Link' 13 13 import {Text} from '../util/text/Text' 14 14 import {UserInfoText} from '../util/UserInfoText' 15 15 import {PostMeta} from '../util/PostMeta' ··· 189 189 lineHeight={1.2} 190 190 numberOfLines={1}> 191 191 From{' '} 192 - <DesktopWebTextLink 192 + <TextLinkOnWebOnly 193 193 type="sm-bold" 194 194 style={pal.textLight} 195 195 lineHeight={1.2} ··· 220 220 lineHeight={1.2} 221 221 numberOfLines={1}> 222 222 Reposted by{' '} 223 - <DesktopWebTextLink 223 + <TextLinkOnWebOnly 224 224 type="sm-bold" 225 225 style={pal.textLight} 226 226 lineHeight={1.2}
+5 -8
src/view/com/util/Link.tsx
··· 27 27 isExternalUrl, 28 28 linkRequiresWarning, 29 29 } from 'lib/strings/url-helpers' 30 - import {isAndroid} from 'platform/detection' 30 + import {isAndroid, isWeb} from 'platform/detection' 31 31 import {sanitizeUrl} from '@braintree/sanitize-url' 32 32 import {PressableWithHover} from './PressableWithHover' 33 33 import FixedTouchableHighlight from '../pager/FixedTouchableHighlight' 34 - import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 35 34 36 35 type Event = 37 36 | React.MouseEvent<HTMLAnchorElement, MouseEvent> ··· 222 221 /** 223 222 * Only acts as a link on desktop web 224 223 */ 225 - interface DesktopWebTextLinkProps extends TextProps { 224 + interface TextLinkOnWebOnlyProps extends TextProps { 226 225 testID?: string 227 226 type?: TypographyVariant 228 227 style?: StyleProp<TextStyle> ··· 235 234 accessibilityHint?: string 236 235 title?: string 237 236 } 238 - export const DesktopWebTextLink = memo(function DesktopWebTextLink({ 237 + export const TextLinkOnWebOnly = memo(function DesktopWebTextLink({ 239 238 testID, 240 239 type = 'md', 241 240 style, ··· 244 243 numberOfLines, 245 244 lineHeight, 246 245 ...props 247 - }: DesktopWebTextLinkProps) { 248 - const {isDesktop} = useWebMediaQueries() 249 - 250 - if (isDesktop) { 246 + }: TextLinkOnWebOnlyProps) { 247 + if (isWeb) { 251 248 return ( 252 249 <TextLink 253 250 testID={testID}
+3 -3
src/view/com/util/PostMeta.tsx
··· 1 1 import React from 'react' 2 2 import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' 3 3 import {Text} from './text/Text' 4 - import {DesktopWebTextLink} from './Link' 4 + import {TextLinkOnWebOnly} from './Link' 5 5 import {niceDate} from 'lib/strings/time' 6 6 import {usePalette} from 'lib/hooks/usePalette' 7 7 import {TypographyVariant} from 'lib/ThemeContext' ··· 47 47 </View> 48 48 )} 49 49 <View style={styles.maxWidth}> 50 - <DesktopWebTextLink 50 + <TextLinkOnWebOnly 51 51 type={opts.displayNameType || 'lg-bold'} 52 52 style={[pal.text, opts.displayNameStyle]} 53 53 numberOfLines={1} ··· 78 78 )} 79 79 <TimeElapsed timestamp={opts.timestamp}> 80 80 {({timeElapsed}) => ( 81 - <DesktopWebTextLink 81 + <TextLinkOnWebOnly 82 82 type="md" 83 83 style={pal.textLight} 84 84 lineHeight={1.2}
+2 -2
src/view/com/util/UserInfoText.tsx
··· 1 1 import React, {useState, useEffect} from 'react' 2 2 import {AppBskyActorGetProfile as GetProfile} from '@atproto/api' 3 3 import {StyleProp, StyleSheet, TextStyle} from 'react-native' 4 - import {DesktopWebTextLink} from './Link' 4 + import {TextLinkOnWebOnly} from './Link' 5 5 import {Text} from './text/Text' 6 6 import {LoadingPlaceholder} from './LoadingPlaceholder' 7 7 import {useStores} from 'state/index' ··· 65 65 ) 66 66 } else if (profile) { 67 67 inner = ( 68 - <DesktopWebTextLink 68 + <TextLinkOnWebOnly 69 69 type={type} 70 70 style={style} 71 71 lineHeight={1.2}