Skip to content

Commit 4c96e06

Browse files
committed
Improve forum toast
1 parent d182628 commit 4c96e06

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Modules/Sources/ForumFeature/ForumFeature.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,12 @@ public struct ForumFeature: Reducer, Sendable {
214214
return .run { _ in await open(url: url) }
215215

216216
case .markRead:
217-
return .concatenate(
218-
.run { [id, isForum] send in
219-
let status = try await apiClient.markRead(id: id, isTopic: !isForum)
220-
let markedAsRead = ToastMessage(text: Localization.markAsReadSuccess, haptic: .success)
221-
await toastClient.showToast(status ? markedAsRead : .whoopsSomethingWentWrong)
222-
},
223-
224-
.send(.internal(.refresh))
225-
)
217+
return .run { [id, isForum] send in
218+
let status = try await apiClient.markRead(id: id, isTopic: !isForum)
219+
let markedAsRead = ToastMessage(text: Localization.markAsReadSuccess, haptic: .success)
220+
await toastClient.showToast(status ? markedAsRead : .whoopsSomethingWentWrong)
221+
await send(.internal(.refresh))
222+
}
226223

227224
case .setFavorite(let isFavorite):
228225
return .run { [id = id, isFavorite = isFavorite, isForum = isForum] send in

0 commit comments

Comments
 (0)