Bluesky app fork with some witchin' additions 💫

Ensure `/start` navigates to `/starter-pack` when clicking a link internally (#4745)

* remove temporary metadata removal

* ensure proper navigation

authored by hailey.at and committed by

GitHub a6b3c97d 6b5e3181

+33 -29
+6
src/lib/strings/url-helpers.ts
··· 5 5 import {logger} from '#/logger' 6 6 import {BSKY_SERVICE} from 'lib/constants' 7 7 import {isInvalidHandle} from 'lib/strings/handles' 8 + import {startUriToStarterPackUri} from 'lib/strings/starter-pack' 8 9 9 10 export const BSKY_APP_HOST = 'https://bsky.app' 10 11 const BSKY_TRUSTED_HOSTS = [ ··· 187 188 if (isBskyAppUrl(url)) { 188 189 try { 189 190 const urlp = new URL(url) 191 + 192 + if (isBskyStartUrl(url)) { 193 + return startUriToStarterPackUri(urlp.pathname) 194 + } 195 + 190 196 return urlp.pathname 191 197 } catch (e) { 192 198 console.error('Unexpected error in convertBskyAppUrlIfNeeded()', e)
+27 -29
src/view/com/util/post-embeds/ExternalLinkEmbed.tsx
··· 79 79 ) : embedPlayerParams ? ( 80 80 <ExternalPlayer link={link} params={embedPlayerParams} /> 81 81 ) : undefined} 82 - {!starterPackParsed ? ( 83 - <View 84 - style={[ 85 - a.flex_1, 86 - a.py_sm, 87 - { 88 - paddingHorizontal: isMobile ? 10 : 14, 89 - }, 90 - ]}> 82 + <View 83 + style={[ 84 + a.flex_1, 85 + a.py_sm, 86 + { 87 + paddingHorizontal: isMobile ? 10 : 14, 88 + }, 89 + ]}> 90 + <Text 91 + type="sm" 92 + numberOfLines={1} 93 + style={[pal.textLight, {marginVertical: 2}]}> 94 + {toNiceDomain(link.uri)} 95 + </Text> 96 + 97 + {!embedPlayerParams?.isGif && !embedPlayerParams?.dimensions && ( 98 + <Text type="lg-bold" numberOfLines={3} style={[pal.text]}> 99 + {link.title || link.uri} 100 + </Text> 101 + )} 102 + {link.description ? ( 91 103 <Text 92 - type="sm" 93 - numberOfLines={1} 94 - style={[pal.textLight, {marginVertical: 2}]}> 95 - {toNiceDomain(link.uri)} 104 + type="md" 105 + numberOfLines={link.thumb ? 2 : 4} 106 + style={[pal.text, a.mt_xs]}> 107 + {link.description} 96 108 </Text> 97 - 98 - {!embedPlayerParams?.isGif && !embedPlayerParams?.dimensions && ( 99 - <Text type="lg-bold" numberOfLines={3} style={[pal.text]}> 100 - {link.title || link.uri} 101 - </Text> 102 - )} 103 - {link.description ? ( 104 - <Text 105 - type="md" 106 - numberOfLines={link.thumb ? 2 : 4} 107 - style={[pal.text, a.mt_xs]}> 108 - {link.description} 109 - </Text> 110 - ) : undefined} 111 - </View> 112 - ) : null} 109 + ) : undefined} 110 + </View> 113 111 </LinkWrapper> 114 112 </View> 115 113 )