Skip to content

Commit fd30263

Browse files
committed
Fix favorites shows empty state on non-favorites first tab
1 parent b3104de commit fd30263

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/Sources/FavoritesFeature/FavoritesFeature.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct FavoritesFeature: Reducer, Sendable {
3030
public var favorites: [FavoriteInfo] = []
3131
public var favoritesImportant: [FavoriteInfo] = []
3232

33-
public var isLoading = false
33+
public var isLoading = true
3434
public var isRefreshing = false
3535
public var unreadTapId: Int?
3636
public var shouldShowEmptyState: Bool {
@@ -110,6 +110,7 @@ public struct FavoritesFeature: Reducer, Sendable {
110110
])
111111

112112
case .onRefresh:
113+
guard !state.isLoading else { return .none }
113114
state.isRefreshing = true
114115
state.unreadTapId = nil
115116
return .run { [offset = state.pageNavigation.offset] send in

0 commit comments

Comments
 (0)