iOS client for Grain grain.social
ios photography atproto
7
fork

Configure Feed

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

fix: trigger feed initial fetch when cache pre-populates galleries

FeedTabContent's .task guarded loadInitial on galleries.isEmpty, but
FeedViewModel.init loads cached galleries synchronously — so on a warm
cache the guard was false and the fresh fetch never ran. cursor stayed
nil and loadMore silently no-oped on its cursor guard, breaking
infinite scroll until the user pulled to refresh. Switch the guard to
!hasFetchedInitial, which the viewmodel already tracks for exactly
this case.

authored by

Hima Aramona and committed by
Chad Miller
24c3f4e4 017f5b79

+1 -1
+1 -1
Grain/Views/Feed/FeedView.swift
··· 358 358 #endif 359 359 return 360 360 } 361 - if viewModel.galleries.isEmpty { 361 + if !viewModel.hasFetchedInitial { 362 362 await viewModel.loadInitial(auth: auth.authContext()) 363 363 lastLoadTime = .now 364 364 }