Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

render adjacent players on ios (#7525)

authored by

Samuel Newman and committed by
GitHub
45b5af60 bdda3020

+12 -2
+12 -2
src/screens/VideoFeed/index.tsx
··· 76 76 import {PostCtrls} from '#/view/com/util/post-ctrls/PostCtrls' 77 77 import {UserAvatar} from '#/view/com/util/UserAvatar' 78 78 import {Header} from '#/screens/VideoFeed/components/Header' 79 - import {atoms as a, platform, ThemeProvider, useTheme} from '#/alf' 79 + import {atoms as a, ios, platform, ThemeProvider, useTheme} from '#/alf' 80 80 import {setNavigationBar} from '#/alf/util/navigationBar' 81 81 import {Button, ButtonIcon, ButtonText} from '#/components/Button' 82 82 import {Divider} from '#/components/Divider' ··· 261 261 index === currentIndex && 262 262 currentSource?.source === post.embed.playlist 263 263 } 264 + adjacent={index === currentIndex - 1 || index === currentIndex + 1} 264 265 moderation={item.moderation} 265 266 scrollGesture={scrollGesture} 266 267 feedContext={item.feedContext} ··· 460 461 post, 461 462 embed, 462 463 active, 464 + adjacent, 463 465 scrollGesture, 464 466 moderation, 465 467 feedContext, ··· 468 470 post: AppBskyFeedDefs.PostView 469 471 embed: AppBskyEmbedVideo.View 470 472 active: boolean 473 + adjacent: boolean 471 474 scrollGesture: NativeGesture 472 475 moderation?: ModerationDecision 473 476 feedContext: string | undefined ··· 486 489 } 487 490 }, [active, post.uri, feedContext, sendInteraction]) 488 491 492 + // TODO: high-performance android phones should also 493 + // be capable of rendering 3 video players, but currently 494 + // we can't distinguish between them 495 + const shouldRenderVideo = active || ios(adjacent) 496 + 489 497 return ( 490 498 <View style={[a.relative, {height, width}]}> 491 499 {postShadow === POST_TOMBSTONE ? ( ··· 512 520 ) : ( 513 521 <> 514 522 <VideoItemPlaceholder embed={embed} /> 515 - {active && player && <VideoItemInner player={player} embed={embed} />} 523 + {shouldRenderVideo && player && ( 524 + <VideoItemInner player={player} embed={embed} /> 525 + )} 516 526 {moderation && ( 517 527 <Overlay 518 528 player={player}