feat: East Africa + Southern Africa pills with regional sub-sections
- East Africa pill: merges Uganda + east-africa tags; Uganda pinned first via sub-sections - Southern Africa pill: covers SA, Namibia, Botswana, Zimbabwe, Zambia, Mozambique; SA/Namibia/Botswana prioritized - StoryStore.setPill now resets lastSyncedAt to bypass 30s rate-limit on filter switch - sectionSupplement background fetch populates sparse regional sections in All digest - SignalFeedView digestContent: flat hero+scroll path for pills without subSections (was showing max 5) - Theme: removed standalone Uganda pill, wired new sub-section layouts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -118,6 +118,9 @@ struct JarvisApp: App {
|
||||
.task {
|
||||
BackgroundRefreshManager.container = container
|
||||
BackgroundRefreshManager.scheduleFeedRefresh()
|
||||
// Pre-populate the feed from SwiftData cache before the first API
|
||||
// fetch completes — prevents the cold-launch empty state.
|
||||
store.bootstrap(container: container)
|
||||
connManager.start()
|
||||
await connManager.resolveAndActivate()
|
||||
await notifications.bootstrap()
|
||||
@@ -127,10 +130,13 @@ struct JarvisApp: App {
|
||||
switch phase {
|
||||
case .active:
|
||||
store.startForegroundSync()
|
||||
// Refresh immediately if we've been away more than 2 minutes.
|
||||
if let last = store.lastSyncedAt,
|
||||
Date().timeIntervalSince(last) > 120 {
|
||||
Task { await store.loadStories(refresh: true) }
|
||||
// Only trigger a load if connectivity has already been resolved.
|
||||
// On cold launch activeHost is nil until resolveAndActivate()
|
||||
// completes — calling loadFeedFull() before that always throws
|
||||
// APIError.notConnected and leaves lastSyncedAt permanently nil.
|
||||
// activate() calls loadFeedFull() itself once the host is confirmed.
|
||||
if connManager.activeHost != nil {
|
||||
Task { await store.loadFeedFull() }
|
||||
}
|
||||
case .background:
|
||||
store.stopForegroundSync()
|
||||
|
||||
Reference in New Issue
Block a user