about summary refs log tree commit diff
path: root/src/state/queries/post-feed.ts
Commit message (Collapse)AuthorAgeFilesLines
...
* Prefer post over quote when finding cached post (#2935)Hailey2024-02-191-1/+8
|
* Precache basic profile from posts for instant future navigations (#2795)Hailey2024-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * skeleton for caching * modify some existing logic * refactor uri resolution query * add precache feed posts * adjustments * remove prefetch on hover (maybe revert, just example) * fix * change arg name to match what we want * optional infinite stale time * use `ProfileViewDetailed` * Revert "remove prefetch on hover (maybe revert, just example)" This reverts commit 08609deb0defa7cea040438bc37dd3488ddc56f4. * add warning comment back for stale time * remove comment * store profile with both the handle and did for query key * remove extra block from revert * clarify argument name * remove QT cache * structure queries the same (put `enabled` at bottom) * use both `ProfileViewDetailed` and `ProfileView` for the query return type * placeholder profile header * remove logs * remove a few other things we don't need * add placeholder * refactor * refactor * we don't need this height adjustment now * use gray banner while loading * set background color of image to the loading placeholder color * reorg imports * add border to header on loading * Fix style * Rm radius * oops * Undo edit * Back out type changes * Tighten some types and moderate shadow * Move precaching fns to profile where the cache is * Rename functions to match what they do now * Remove anys --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* move to correct fileHailey2024-01-301-0/+13
|
* Add a new home feed-api wrapper and give a header indicating the fallback ↵Paul Frazee2024-01-151-1/+6
| | | | | | | | | behavior (#2534) * Add a new home feed-api wrapper and give a header indicating the fallback behavior * Sneak in a quick fix: use the correct text color in the delete modal * Use imported constant
* Reduce web requests (#2420)Paul Frazee2024-01-041-0/+4
| | | | | * Stop auto-refetching app passwords and invites on an interval * Don't poll for posts or notifs if the app/tab isnt focused
* Hide posts tool (#2299)Eric Bailey2023-12-241-6/+2
| | | | | | | | | | | | | * Set up hidden posts persisted state * Wrap moderatePost * Integrate hidden posts into moderation * Complete hide-post behaviors --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Traffic reduction and tuned caching strats (#2215)Paul Frazee2023-12-151-14/+21
| | | | | | | | | | | | | * Update the feed to only check latest on focus after 30s, but to do a full reset on focus after 1 hour to avoid very stale data * Remove the isFeedPublic query * Fix: avoid double next-page fetches * Reduce some poll intervals to reduce server load * Guard against double-fires of fetchNextPage * Reduce polling on blurred screens
* PWI behavior updates (#2207)Paul Frazee2023-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable PWI * Disable access to feeds on PWI * Remove feeds nav item from drawer when signed out * Replace discover feed on home with a CTA * Wire up the sign in and create account buttons to go straight to their respective screens * Give a custom ScreenHider interface for no-pwi * Add side borders on desktop to the screen hider * Filter accounts in the autocomplete according to mod settings * Trim replies in the post thread that are pwi opt-out * Show 'learn more' on the content hider when no-override is enabled * Apply the moderation filter on profile cards * Disable post search on logged-out view * Update locale files * Bump api pkg * Ensure feeds with no posts don't show as NSFPublic * Fix types --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Feed bugfixes (#2204)Paul Frazee2023-12-131-1/+7
| | | | | * Dont show both an error and empty message in the feed * Add a sanity check when attempting to fill the first 30
* Use new filter for Posts tab on profile (#2150)Eric Bailey2023-12-081-0/+1
| | | | | | | * Use new filter for Posts tab on profile * Update deps * Remove log
* Add manual per-page memoization to post select (#2146)dan2023-12-081-57/+120
|
* Grab-bag of post-feed improvements (#2140)Paul Frazee2023-12-071-1/+5
| | | | | | | * Sanity check against cases where empty pages may occur * Use the mergefeed as an emergency fallback to an empty feed * Check for new posts on focus
* Hoist moderation, attempt to fill feed up to 30 (#2134)Eric Bailey2023-12-071-32/+81
| | | | | | | | | | | * Move moderatePost up to feed query * Attemt to fill page up to 30 * Add the 'ensure full page' behavior to notifs --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Perf: Include quote posts in the post-thread placeholder (#2104)Paul Frazee2023-12-051-0/+5
|
* Fix: correctly identify if the screen is focused when handling soft resets ↵Paul Frazee2023-12-051-1/+1
| | | | on post feeds (#2100)
* Update feeds on post created (#2085)Paul Frazee2023-12-041-1/+1
|
* Beep boop (#2051)Eric Bailey2023-11-301-4/+7
|
* Rewrite the shadow logic to look inside the cache (#2045)dan2023-11-301-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reset * Associate shadows with the cache * Use colocated helpers * Fix types * Reorder for clarity * More types * Copy paste logic for profile * Hook up profile query * Hook up suggested follows * Hook up other profile things * Fix shape * Pass setShadow into the effect deps * Include reply posts in the shadow cache search --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Fix lag when switching tabs (#2046)dan2023-11-301-38/+43
|
* Apply feed preferences (react-query refactor) (#2040)Paul Frazee2023-11-291-67/+81
| | | | | * Actually implement the feed tuners hook * Move feed-tuner pass into select() to have it apply immediately on change
* Handle nsfw feeds in public view (#2035)Eric Bailey2023-11-291-1/+37
| | | | | | | | | | | | | | | | | | | * Handle nsfw feeds in public view * Translate * Refactor, new approach * Translate * Copy * Translate * Revert changes to Feed * Remove unused retry * Translate
* Fix state lifecycle management with post-feed query, solving the duplicate ↵Paul Frazee2023-11-291-69/+74
| | | | | | | key issue (#2034) * Assign keys to feed slices via a counter, to enable duplicate items in the feed if needed * Move post-feed query state into the query's page params to consistently bind their lifecycles
* Get more rigorous about getAgent() consistency (#2026)Paul Frazee2023-11-291-10/+8
| | | | | * Get more rigorous about getAgent() consistency * Update the feed wrapper API to use getAgent() directly
* Ensure we use following feed if merge is disabled (#2005)Eric Bailey2023-11-271-1/+1
|
* Restore post-thread caching behaviors (react-query refactor) (#2010)Paul Frazee2023-11-271-2/+38
| | | | | | | | | | | | | | | | | | | | | * Rework resolve-did and resolve-uri queries to be smarter about cache reuse * Precache handle resolutions * Remove old unused code * Load placeholder threads from the post-feed and notifications-feed queries * Remove logs * Fix bad ref * Add loading spinners to the cache-loading thread view * Scroll replies into view when loading threads * Add caching within a thread * Fix: dont show bottom border when the child spinner is active
* Move the current agent to a global and reset RQ queries on agent change (#1946)Paul Frazee2023-11-161-2/+2
|
* Caching heuristics (#1938)Eric Bailey2023-11-161-0/+2
| | | | | * Tempfix profile load * First pass at staleTime
* Fix memo params causing tuner to lose state (#1924)Paul Frazee2023-11-151-2/+4
|
* Factor out store from post-feed query (#1888)Eric Bailey2023-11-131-9/+11
|
* Refactor feeds to use react-query (#1862)Paul Frazee2023-11-101-0/+176
* Update to react-query v5 * Introduce post-feed react query * Add feed refresh behaviors * Only fetch feeds of visible pages * Implement polling for latest on feeds * Add moderation filtering to slices * Handle block errors * Update feed error messages * Remove old models * Replace simple-feed option with disable-tuner option * Add missing useMemo * Implement the mergefeed and fixes to polling * Correctly handle failed load more state * Improve error and empty state behaviors * Clearer naming