Video, UI & Stability Patches + Per-User Settings#12
Open
rferrari wants to merge 12 commits intoSkateHive:vaipraondefrom
Open
Video, UI & Stability Patches + Per-User Settings#12rferrari wants to merge 12 commits intoSkateHive:vaipraondefrom
rferrari wants to merge 12 commits intoSkateHive:vaipraondefrom
Conversation
Android will continue to aggressively unmount players when they leave the screen to prevent Out-Of-Memory (OOM) crashes, and will use WebView fallbacks as needed via your VideoConfig. This retains all your memory leak fixes. iOS will now keep the native AVPlayer buffered and mounted regardless of isInView constraints (imitating the main branch), ensuring smooth, instantaneous video playback without the "fail to play" issues caused by rapid mounting/unmounting. I've also reverted useApi to false in SnapConfig.ts strictly for iOS so it uses the native stable DHive fetching mechanism like the main branch.
VideoWithAutoplay.tsx: Reintroduced the thumbnailUrl prop and added isPlaying tracking. Overlay UI: Merged the static Image poster and ActivityIndicator spinner overlays identically to how it functioned in main (only hiding it once onPlaybackStarted fires). MediaPreview.tsx: Updated its props and ensured thumbnailUrl cascades correctly into <VideoWithAutoplay /> when rendering a video.
…cefully during the logout sequence before the navigation transitions resolve.
…llView container style to its contentContainerStyle and increased it to 130px.
…eturns a timeout error instead of an array.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Here is what has been implemented:
Feed Normalization: I created a reusable function (normalizeFeedData) in lib/api.ts that takes the raw API response and properly converts the soft posts, formatting, stringified JSON, and active_votes so that PostCard can read them smoothly. This gives Trending and Following exactly the same shape and treatment as the SnapsFeed.
New endpoints added: getFollowingFeedAPI utilizes /feed/${username}/following and getTrendingFeedAPI utilizes /trending.
Toggle Logic: Inside useSnaps.ts, it now checks SnapConfig.useApi. If it's true, the Following and Trending feeds will hit the new API endpoints. It successfully tracks the pagination with apiPageRef.
Dhive Fallback: If useApi is false, or if the Skatehive API fails unexpectedly, it has a built-in catch block that seamlessly falls back to the native dhive implementation (getDiscussions mapped by feed type and COMMUNITY_TAG, respectively).
…t should be /api/v2/feed/trending, but my previous code was hitting /api/v2/trending, which resulted in a 404 HTML page.
…naps.ts! Now, when the app gathers the Following feed, it manually iterates through everything and aggressively strips out any post that is not tagged with hive-173115 or not posted directly into the Skatehive community.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR bundles critical bug fixes, UI improvements, and a new per-user settings feature for the mobile app.
🎬 Video System
VideoWithAutoplaycomponent for consistent preview imagesVideoPlayerinstances to unmount gracefully during logout, preventing the "shared object already released" crash🎨 UI & Loading
ActivityIndicatorandMatrixRaininstances with the theme-awareThemedLoadingcomponent across the entire appScrollViewcontainerstyletocontentContainerStyleand increased to 130px, fixing clipped items at the bottom🐛 Bug Fixes
✨ New Feature
AppSettingsContextto persist settings with user-namespaced keys (e.g.,app_settings_alice). Themes, session duration, and video preferences are now isolated per account.AuthProviderautomatically pushes the username during login/logout/initialization.