Skip to content

Commit

Permalink
feat: ProfileViewReactor DeleteMembersProfileUseCase 추가 및 프로필 이미지 삭제 …
Browse files Browse the repository at this point in the history
…API 호출 로직 추가
  • Loading branch information
Do-hyun-Kim committed Sep 26, 2024
1 parent fd21bc7 commit 2eb6d40
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public final class ProfileViewReactor: Reactor {
@Injected private var createProfilePresignedUseCase: CreateCameraUseCaseProtocol
@Injected private var uploadProfileImageUseCase: FetchCameraUploadImageUseCaseProtocol
@Injected private var updateProfileUseCase: UpdateMembersProfileUseCaseProtocol
@Injected private var deleteProfileImageUseCase: DeleteMembersProfileUseCaseProtocol



Expand Down Expand Up @@ -176,19 +177,16 @@ public final class ProfileViewReactor: Reactor {
}
}
)

case .didTapInitProfile:
return fetchMembersProfileUseCase.execute(memberId: memberId)
return deleteProfileImageUseCase.execute(memberId: memberId)
.asObservable()
.flatMap { entity -> Observable<ProfileViewReactor.Mutation> in
.flatMap { entity -> Observable<Mutation> in
return .concat(
.just(.setLoading(false)),
.just(.setProfileMemberItems(entity)),
.just(.setLoading(true))
)

}

case let .didTapSegementControl(feedType):
provider.profilePageGlobalState.didTapSegmentedPageType(type: feedType)
return .just(.setProfileFeedType(feedType))
Expand Down

0 comments on commit 2eb6d40

Please sign in to comment.