Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-nirali-s committed Nov 19, 2024
1 parent 8839216 commit 464b387
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,13 @@ class GroupSettleUpViewModel: BaseViewModel, ObservableObject {
}

private func fetchGroupMembers() async {
guard let group else {
guard let group, let userId = preference.user?.id else {
viewState = .initial
return
}

do {
viewState = .loading
guard let userId = preference.user?.id else {
viewState = .initial
return
}
self.members = try await groupRepository.fetchMembersBy(memberIds: group.members)
self.members.removeAll(where: { $0.id == userId })
viewState = .initial
Expand Down

0 comments on commit 464b387

Please sign in to comment.