Skip to content

Commit

Permalink
Add setupBindings for MomentsRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeLin committed Mar 21, 2021
1 parent da49ee0 commit f08d3b1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Moments/Moments/Features/Moments/Repositories/MomentsRepo.swift
Expand Up @@ -38,10 +38,7 @@ struct MomentsRepo: MomentsRepoType {
self.getMomentsByUserIDSession = getMomentsByUserIDSession
self.updateMomentLikeSession = updateMomentLikeSession

persistentDataStore
.momentsDetails
.subscribe(momentsDetails)
.disposed(by: disposeBag)
setupBindings()
}

func getMoments(userID: String) -> Observable<Void> {
Expand All @@ -60,3 +57,12 @@ struct MomentsRepo: MomentsRepoType {
.catchErrorJustReturn(())
}
}

private extension MomentsRepo {
func setupBindings() {
persistentDataStore
.momentsDetails
.subscribe(momentsDetails)
.disposed(by: disposeBag)
}
}

0 comments on commit f08d3b1

Please sign in to comment.