Skip to content

Commit

Permalink
Update provision profile
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-amisha-i committed Nov 22, 2024
1 parent f446ad9 commit 9b40867
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Data/Data/Repository/GroupRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public class GroupRepository: ObservableObject {
public func fetchMembersBy(memberIds: [String]) async throws -> [AppUser] {
var members: [AppUser] = []

// Filter out memberIds that already exist in groupMembers to minimize API calls
// Filter out memberIds that already exist in groupMembers to minimise API calls
let missingMemberIds = memberIds.filter { memberId in
let cachedMember = self.groupMembers.first { $0.id == memberId }
return cachedMember == nil
Expand Down
1 change: 1 addition & 0 deletions Splito.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.canopas.splito;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "provision-splito-distribution-2024-03-04";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ struct GroupPaymentView: View {
HStack(alignment: .center, spacing: 24) {
ProfileCardView(name: viewModel.payerName, imageUrl: viewModel.payer?.imageUrl, geometry: geometry)

Image(.transactionIcon)
.resizable()
.scaledToFit()
.frame(width: 42, height: 42)
Button {
viewModel.switchPayerAndReceiver()
} label: {
Image(.transactionIcon)
.resizable()
.scaledToFit()
.frame(width: 42, height: 42)
}

ProfileCardView(name: viewModel.payableName, imageUrl: viewModel.receiver?.imageUrl, geometry: geometry)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class GroupPaymentViewModel: BaseViewModel, ObservableObject {
private let groupId: String

let transactionId: String?
private let payerId: String
private let receiverId: String
private var payerId: String
private var receiverId: String
private var transaction: Transactions?
private let router: Router<AppRoute>?

Expand All @@ -65,6 +65,15 @@ class GroupPaymentViewModel: BaseViewModel, ObservableObject {
}
}

func switchPayerAndReceiver() {
let temp = payer
payer = receiver
receiver = temp

payerId = payer?.id ?? ""
receiverId = receiver?.id ?? ""
}

// MARK: - Data Loading
private func fetchGroup() async {
do {
Expand Down

0 comments on commit 9b40867

Please sign in to comment.