Skip to content

Commit

Permalink
✨ [#271] FilterFeature / 파일 끝난 후 리프레쉬
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsh153 committed Sep 4, 2023
1 parent dbcb866 commit 084654d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi

#if !NEEDLE_DYNAMIC

@inline(never) private func register1() {
private func register1() {
registerProviderFactory("^->AppComponent->JwtStoreComponent", factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider)
Expand Down
8 changes: 8 additions & 0 deletions Projects/Feature/MainFeature/Sources/Intent/MainIntent.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FilterFeatureInterface
import MyPageFeatureInterface
import Combine
import MainFeatureInterface
import StudentDomainInterface
Expand Down Expand Up @@ -99,5 +100,12 @@ extension MainIntent: FilterDelegate {
func filterDidCompleted(filterOption: FilterOptionDTO?) {
model?.updateFilterOption(filterOpion: .init(dto: filterOption ?? .init()))
model?.updatePage(page: 1)
self.refresh(filterOption: .init(dto: filterOption ?? .init()))
}
}

extension MainIntent: MyPageDelegate {
func completeModify() {
self.refresh(filterOption: .init(dto: .init()))
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public protocol MyPageDelegate: AnyObject {
func logout()
func completeModify()
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ final class MyPageIntent: MyPageIntentProtocol {

try await modifyInformationUseCase.execute(req: modifyInformationRequest)
model?.updateIsLoading(isLoading: false)
myPageDelegate?.completeModify()
} catch {
model?.updateIsError(isError: true)
model?.updateIsLoading(isLoading: false)
Expand Down
3 changes: 2 additions & 1 deletion Projects/Feature/RootFeature/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let project = Project.makeModule(
.Feature.InputInformationFeatureInterface,
.Feature.MainFeatureInterface,
.Feature.SplashFeatureInterface,
.Feature.BaseFeature
.Feature.BaseFeature,
.Feature.MyPageFeatureInterface
]
)
7 changes: 7 additions & 0 deletions Projects/Feature/RootFeature/Sources/Intent/RootIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import InputInformationFeatureInterface
import MainFeatureInterface
import SigninFeatureInterface
import SplashFeatureInterface
import MyPageFeatureInterface

final class RootIntent: RootIntentProtocol {
private weak var model: (any RootActionProtocol)?
Expand Down Expand Up @@ -39,3 +40,9 @@ extension RootIntent: SplashDelegate {
model?.updateSceneType(type: isLoggedIn ? .main : .signin)
}
}

extension RootIntent: MyPageDelegate {
func completeModify() {
model?.updateSceneType(type: .main)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import InputInformationFeatureInterface
import MainFeatureInterface
import SigninFeatureInterface
import SplashFeatureInterface
import MyPageFeatureInterface

protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate {}
protocol RootIntentProtocol: InputInformationDelegate, SigninDelegate, MainDelegate, SplashDelegate, MyPageDelegate {}

0 comments on commit 084654d

Please sign in to comment.