Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Make posts behave more like links (#1316)

* use cursor for post cards

* ignore type error

* handle meta keys on non native links

(cherry picked from commit daccafea0b7ab21af6572767e496d20f32ead353)

* remove cursor on non-post notifications, not quite right

* Simplify link handling

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

authored by

Eric Bailey
Paul Frazee
and committed by
GitHub
1c460c40 cc283876

+18 -5
+5
src/view/com/post-thread/PostThreadItem.tsx
··· 367 367 pal.border, 368 368 pal.view, 369 369 item._showParentReplyLine && hasPrecedingItem && styles.noTopBorder, 370 + styles.cursor, 370 371 ]} 371 372 moderation={item.moderation.content}> 372 373 <PostSandboxWarning /> ··· 615 616 width: 2, 616 617 marginLeft: 'auto', 617 618 marginRight: 'auto', 619 + }, 620 + cursor: { 621 + // @ts-ignore web only 622 + cursor: 'pointer', 618 623 }, 619 624 })
+1
src/view/com/post/Post.tsx
··· 304 304 paddingBottom: 5, 305 305 paddingLeft: 10, 306 306 borderTopWidth: 1, 307 + cursor: 'pointer', 307 308 }, 308 309 layout: { 309 310 flexDirection: 'row',
+1
src/view/com/posts/FeedItem.tsx
··· 343 343 borderTopWidth: 1, 344 344 paddingLeft: 10, 345 345 paddingRight: 15, 346 + cursor: 'pointer', 346 347 }, 347 348 outerSmallTop: { 348 349 borderTopWidth: 0,
+11 -5
src/view/com/util/Link.tsx
··· 259 259 e?: Event, 260 260 ) { 261 261 let shouldHandle = false 262 + const isLeftClick = 263 + // @ts-ignore Web only -prf 264 + Platform.OS === 'web' && (e.button == null || e.button === 0) 265 + // @ts-ignore Web only -prf 266 + const isMiddleClick = Platform.OS === 'web' && e.button === 1 267 + const isMetaKey = 268 + // @ts-ignore Web only -prf 269 + Platform.OS === 'web' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) 270 + const newTab = isMetaKey || isMiddleClick 262 271 263 272 if (Platform.OS !== 'web' || !e) { 264 273 shouldHandle = e ? !e.defaultPrevented : true 265 274 } else if ( 266 275 !e.defaultPrevented && // onPress prevented default 267 - // @ts-ignore Web only -prf 268 - !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys 269 - // @ts-ignore Web only -prf 270 - (e.button == null || e.button === 0) && // ignore everything but left clicks 276 + (isLeftClick || isMiddleClick) && // ignore everything but left and middle clicks 271 277 // @ts-ignore Web only -prf 272 278 [undefined, null, '', 'self'].includes(e.currentTarget?.target) // let browser handle "target=_blank" etc. 273 279 ) { ··· 277 283 278 284 if (shouldHandle) { 279 285 href = convertBskyAppUrlIfNeeded(href) 280 - if (href.startsWith('http') || href.startsWith('mailto')) { 286 + if (newTab || href.startsWith('http') || href.startsWith('mailto')) { 281 287 Linking.openURL(href) 282 288 } else { 283 289 store.shell.closeModal() // close any active modals