Skip to content

Commit

Permalink
⚡ :: [#148] 추가 성능 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
baekteun committed Sep 14, 2024
1 parent 9651cd3 commit e8cbd1e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Projects/Feature/SettingsFeature/Sources/SettingsCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,23 @@ public struct SettingsCore: Reducer {

return .none
}
.alertFeatures()
.subFeatures()
}
}

extension Reducer where State == SettingsCore.State, Action == SettingsCore.Action {
func subFeatures() -> some ReducerOf<Self> {
self
.ifLet(\.$alert, action: /Action.alert)
.ifLet(\.$confirmationDialog, action: /Action.confirmationDialog)
.ifLet(\.$schoolSettingCore, action: /Action.schoolSettingCore) { SchoolSettingCore() }
.ifLet(\.$allergySettingCore, action: /Action.allergySettingCore) { AllergySettingCore() }
.ifLet(\.$modifyTimeTableCore, action: /Action.modifyTimeTableCore) { ModifyTimeTableCore() }
.ifLet(\.$tutorialCore, action: /Action.tutorialCore) { TutorialCore() }
}

func alertFeatures() -> some ReducerOf<Self> {
self
.ifLet(\.$alert, action: /Action.alert)
.ifLet(\.$confirmationDialog, action: /Action.confirmationDialog)
}
}

0 comments on commit e8cbd1e

Please sign in to comment.