File tree Expand file tree Collapse file tree
Application/DevLogPresentation/Sources/Home/Home Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import Foundation
1313
1414extension HomeFeature {
1515 private enum CancelID : Hashable {
16- case delayedModal ( ModalType )
16+ case delayedTodoEditor
1717 case networkConnectivity
1818 }
1919
@@ -119,15 +119,12 @@ extension HomeFeature {
119119 }
120120 }
121121
122- func delayedModalEffect ( _ type : ModalType ) -> Effect < Action > {
122+ func delayedTodoEditorEffect ( ) -> Effect < Action > {
123123 . run { [ clock] send in
124124 try await clock. sleep ( for: . seconds( 0.1 ) )
125- switch type {
126- case . todoEditor:
127- await send ( . setPresentation( . todoEditor, true ) )
128- }
125+ await send ( . setPresentation( . todoEditor, true ) )
129126 }
130- . cancellable ( id: CancelID . delayedModal ( type ) , cancelInFlight: true )
127+ . cancellable ( id: CancelID . delayedTodoEditor , cancelInFlight: true )
131128 }
132129
133130 func fetchRecentTodos( fetchTodosUseCase: FetchTodosUseCase ) async throws -> TodoPage {
Original file line number Diff line number Diff line change @@ -139,10 +139,6 @@ struct HomeFeature {
139139 static let search = Self ( destination: . search)
140140 }
141141
142- enum ModalType : Hashable {
143- case todoEditor
144- }
145-
146142 enum Presentation : Equatable {
147143 case todoEditor
148144 case contentPicker
@@ -235,7 +231,7 @@ struct HomeFeature {
235231 case . tapTodoCategory( let category) :
236232 state. selectedTodoCategory = category
237233 state. sheet = nil
238- return delayedModalEffect ( . todoEditor )
234+ return delayedTodoEditorEffect ( )
239235 case . orderTodoCategory( let preferences) :
240236 state. preferences = preferences
241237 state. recentTodos = Self . syncRecentTodos ( state. recentTodos, preferences: preferences)
You can’t perform that action at this time.
0 commit comments