Skip to content

Commit 959b853

Browse files
committed
fix: refresh 알림 관찰 재구독
1 parent c8d808b commit 959b853

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Application/DevLogPresentation/Sources/PushNotification/PushNotificationListFeature.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ private extension PushNotificationListFeature {
153153
switch action {
154154
case .refresh:
155155
state.nextCursor = nil
156-
return fetchNotificationsPageEffect(query: state.query, cursor: nil, showsIndicator: false)
156+
return fetchNotificationsEffect(
157+
query: state.query,
158+
cursor: nil,
159+
existingCount: 0,
160+
showsIndicator: false
161+
)
157162
case .fetchNotifications:
158163
state.nextCursor = nil
159164
return fetchNotificationsEffect(query: state.query, cursor: nil, existingCount: 0)
@@ -270,10 +275,11 @@ private extension PushNotificationListFeature {
270275
func fetchNotificationsEffect(
271276
query: PushNotificationQuery,
272277
cursor: PushNotificationCursor?,
273-
existingCount: Int
278+
existingCount: Int,
279+
showsIndicator: Bool = true
274280
) -> Effect<Action> {
275281
let limit = max(query.pageSize, existingCount)
276-
let fetchEffect = fetchNotificationsPageEffect(query: query, cursor: cursor)
282+
let fetchEffect = fetchNotificationsPageEffect(query: query, cursor: cursor, showsIndicator: showsIndicator)
277283
let observeEffect = observeNotificationsEffect(
278284
query: query,
279285
limit: max(limit, existingCount + query.pageSize)

0 commit comments

Comments
 (0)