Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ”€ :: [#271] ν•„ν„°, μˆ˜μ • ν–ˆμ„ μ‹œ μƒˆλ‘œ refresh #272

Merged
merged 4 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -9,6 +9,8 @@ import TechStackAppendFeatureInterface
@testable import MajorDomainTesting

final class DummyMyPageDelegate: MyPageDelegate {
func completeModify() {}

func logout() {}
}

Expand Down
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 @@ -176,6 +176,7 @@ final class MyPageIntent: MyPageIntentProtocol {
try await modifyInformationUseCase.execute(req: modifyInformationRequest)
model?.updateIsLoading(isLoading: false)
model?.updateIsCompleteModify(isComplete: true)
myPageDelegate?.completeModify()
} catch {
model?.updateIsError(isError: true)
model?.updateIsLoading(isLoading: false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct MyPageView: View {

CTAButton(text: "μ €μž₯") {
intent.modifyToInputAllInfo(state: state)
dismiss()
}
.padding(.horizontal, 20)
.padding(.bottom, safeAreaInsets.bottom + 16)
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
]
)
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