Commit graph

54 commits

Author SHA1 Message Date
Jackson Harper
97657c5a79 Prevent fetching article before router params have been read
This prevents us from making an initial fetch with an undefined
slug and username that then returns a 400. This happens because
router isn't setup when we first make the call.
2024-08-27 15:00:45 +08:00
Jackson Harper
0ed6c5cf86 Add siteName to article so its available on debug page 2024-08-26 14:32:43 +08:00
Jackson Harper
fe1567fa78 Allow the highlights attribute of articles to be undefined 2024-08-23 14:24:00 +08:00
Jackson Harper
a86ae2ab93 Use the main gql fetcher 2024-08-21 17:00:46 +08:00
Jackson Harper
6d21730fb9 Better error handling for search 2024-08-20 18:27:39 +08:00
Jackson Harper
51f9fb0c2d Re-enable the processing items checks 2024-08-20 13:19:29 +08:00
Jackson Harper
64cb4eb249 Instead of checking limit use initial index for cache checks 2024-08-19 15:35:02 +08:00
Jackson Harper
82f5c5017c log filteredPages 2024-08-19 15:30:47 +08:00
Jackson Harper
e2a49aec71 Trim old pages from the cache 2024-08-19 15:10:20 +08:00
Jackson Harper
2282a6adde Set cache info in the cache pageInfo section 2024-08-19 14:38:03 +08:00
Jackson Harper
8f480d654a More debugging 2024-08-19 14:08:25 +08:00
Jackson Harper
45c7a57696 More debugging 2024-08-19 13:51:41 +08:00
Jackson Harper
ca7b515488 Remove some of the cache logging to make debugging easier 2024-08-19 13:21:06 +08:00
Jackson Harper
e6a220c984 Remove stale time to force refreshed, start using the cached result 2024-08-19 13:00:14 +08:00
Jackson Harper
4bfcbde65d Some more list improvements 2024-08-19 12:42:43 +08:00
Jackson Harper
541aa859d2 Use staleTime 2024-08-17 17:07:14 +08:00
Jackson Harper
3435edfb51 Remove maxPages 2024-08-17 15:21:57 +08:00
Jackson Harper
b0e7737e18 Add getPreviousPage 2024-08-17 14:43:22 +08:00
Jackson Harper
095e75f7bd Attempt at using maxPages 2024-08-17 14:19:26 +08:00
Jackson Harper
9a2490253c Improve fetchMore, add debug 2024-08-16 15:55:36 +08:00
Jackson Harper
641c64e108 Try max pages 5 2024-08-15 16:51:08 +08:00
Jackson Harper
49b66f3504 Remove the cache busting 2024-08-15 16:27:05 +08:00
Jackson Harper
3ceb18400c Only allow three pages of data to be refreshed 2024-08-15 15:24:02 +08:00
Jackson Harper
913ad0c5d4 More cache key debugging 2024-08-15 13:20:29 +08:00
Jackson Harper
5f94a2a38b Remove stale time on infinite query 2024-08-15 12:35:39 +08:00
Jackson Harper
9e86ddc39b Improve cache key when no query, reduce stale time 2024-08-15 12:20:24 +08:00
Jackson Harper
5373f16328 Add a staleTime to library items query 2024-08-15 11:56:22 +08:00
Jackson Harper
39da8e60c1 More debugging on infinite scroll 2024-08-15 11:39:26 +08:00
Jackson Harper
9923a3baa1 Set a stale time to try to prevent over fetching 2024-08-14 12:55:45 +08:00
Jackson Harper
e16acb7f60 Use react-query for most viewer queries to get better caching, remove the maxpages on library as that broke scrolling 2024-08-14 11:41:55 +08:00
Hongbo Wu
4c992f74ec
Merge pull request #4260 from omnivore-app/perf/cache-api-response
perf/cache api response
2024-08-14 11:32:19 +08:00
Jackson Harper
48f427401f Set maxPages to 2, dont disable refetch yet 2024-08-14 10:01:51 +08:00
Jackson Harper
f58ddbeb9a Add maxPages and refetchOnMount params 2024-08-14 09:58:29 +08:00
Jackson Harper
338f3bca78 WIP: infinite scroll on the library with react-query 2024-08-14 09:48:56 +08:00
Hongbo Wu
c2ec95845e request count of library items only when needed 2024-08-14 09:40:59 +08:00
Hongbo Wu
4bc154605f get highlightsCount from the backend and show the count on web 2024-08-13 18:01:20 +08:00
Jackson Harper
602acbbe31 Leave recommendations attribute as it still could be used in iOS 2024-08-13 17:12:26 +08:00
Jackson Harper
a92db4e216 Dont query for recommendations 2024-08-13 16:41:44 +08:00
Jackson Harper
1316a4d554 Increase delay time on checking processing items 2024-08-13 11:00:39 +08:00
Jackson Harper
255488ec7d Better handling of pending items 2024-08-12 22:27:24 +08:00
Jackson Harper
6529b87e9d Some improvements to the additem 2024-08-12 20:40:28 +08:00
Jackson Harper
74320d5917 use new react-query for addurl 2024-08-12 15:03:05 +08:00
Jackson Harper
15f201fcfc Use a default inbox for the home view for now, combining the two library and subscription queries 2024-08-12 11:09:56 +08:00
Jackson Harper
4a8332ba14 Better handling of multi select controls depending on section 2024-08-12 11:09:56 +08:00
Jackson Harper
ab0e9b28be Move bulk action to react-query 2024-08-12 11:09:56 +08:00
Jackson Harper
34bae118f4 Better rollback on failure 2024-08-12 11:09:56 +08:00
Jackson Harper
6356a8a3c7 More improvments to optimistic caching 2024-08-12 11:09:56 +08:00
Jackson Harper
6c6cc8d4c4 Better handling of slugs and library item lists in the cache 2024-08-12 11:09:56 +08:00
Jackson Harper
17e547b95e Make sure cached reading progress is updated 2024-08-12 11:09:56 +08:00
Jackson Harper
d0e4908c0f Better cache handling when setting labels 2024-08-12 11:09:56 +08:00