mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Try faster append toots
This commit is contained in:
		| @@ -167,11 +167,11 @@ const TimelineRefresh: React.FC<Props> = ({ | |||||||
|  |  | ||||||
|           prevCache.current = res.body.slice(0, -PREV_PER_BATCH) |           prevCache.current = res.body.slice(0, -PREV_PER_BATCH) | ||||||
|           return { |           return { | ||||||
|  |             ...old, | ||||||
|             pages: [ |             pages: [ | ||||||
|               { ...res, body: res.body.slice(-PREV_PER_BATCH) }, |               { ...res, body: res.body.slice(-PREV_PER_BATCH) }, | ||||||
|               ...old.pages.slice(0, keepPagesCount) |               ...old.pages.slice(0, keepPagesCount) | ||||||
|             ], |             ] | ||||||
|             pageParams: [{}, ...old.pageParams.slice(0, keepPagesCount)] |  | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|  |  | ||||||
| @@ -189,7 +189,7 @@ const TimelineRefresh: React.FC<Props> = ({ | |||||||
|             flRef.current?.scrollToOffset({ offset: scrollY.value - 15, animated: true }) |             flRef.current?.scrollToOffset({ offset: scrollY.value - 15, animated: true }) | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           await new Promise<void>(promise => setTimeout(promise, 64)) |           await new Promise<void>(promise => setTimeout(promise, 16)) | ||||||
|           queryClient.setQueryData< |           queryClient.setQueryData< | ||||||
|             InfiniteData< |             InfiniteData< | ||||||
|               PagedResponse<(Mastodon.Status | Mastodon.Notification | Mastodon.Conversation)[]> |               PagedResponse<(Mastodon.Status | Mastodon.Notification | Mastodon.Conversation)[]> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user