File tree Expand file tree Collapse file tree
Application/DevLogPresentation/Sources/Settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ import Foundation
1313
1414@Reducer
1515struct SettingsFeature {
16+ private enum CancelID : Hashable {
17+ case networkConnectivity
18+ case systemTheme
19+ }
20+
1621 @ObservableState
1722 struct State : Equatable {
1823 @Presents var alert : AlertState < Action . Alert > ?
@@ -247,6 +252,7 @@ private extension SettingsFeature {
247252 . receive ( on: DispatchQueue . main)
248253 . map ( Action . networkStatusChanged)
249254 }
255+ . cancellable ( id: CancelID . networkConnectivity, cancelInFlight: true )
250256 }
251257
252258 func monitorSystemThemeEffect( ) -> Effect < Action > {
@@ -256,6 +262,7 @@ private extension SettingsFeature {
256262 . receive ( on: DispatchQueue . main)
257263 . map { . binding( . set( \. theme, $0) ) }
258264 }
265+ . cancellable ( id: CancelID . systemTheme, cancelInFlight: true )
259266 }
260267
261268 func updateSystemThemeEffect( _ theme: SystemTheme ) -> Effect < Action > {
You can’t perform that action at this time.
0 commit comments