Browse Source

release 2.5.0(4)

pull/1/head
InKwon James Kim 5 years ago
parent
commit
600619fda6
  1. 2
      GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift
  2. 20
      GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/ViewModel/SetupRecipientViewModel.swift

2
GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift

@ -451,7 +451,7 @@ extension SetupRecipientViewController {
textField.validCondition = { ($0.count >= min && $0.count <= max) } textField.validCondition = { ($0.count >= min && $0.count <= max) }
} }
if !textField.titleText.contains("optional_hint_text") {
if !textField.titleText.contains("optional_hint_text".localized()) {
textField.titleText += "optional_hint_text".localized() textField.titleText += "optional_hint_text".localized()
textField.placeholder = "\(textField.placeholder ?? "") \("optional_hint_text".localized())" textField.placeholder = "\(textField.placeholder ?? "") \("optional_hint_text".localized())"
} }

20
GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/ViewModel/SetupRecipientViewModel.swift

@ -275,6 +275,7 @@ extension SetupRecipientViewModel: SetupRecipientViewModelInterface {
countryServicesLinker.onNext(model) countryServicesLinker.onNext(model)
guard let recipient = recipient else { return } guard let recipient = recipient else { return }
selectedRecipientLinker.onNext(recipient) selectedRecipientLinker.onNext(recipient)
// If exist selected recipient, auto select country and payment mode of selected recipient. // If exist selected recipient, auto select country and payment mode of selected recipient.
@ -332,6 +333,25 @@ extension SetupRecipientViewModel: SetupRecipientViewModelInterface {
selectedPaymentModeTypesLinker.onNext(nil) selectedPaymentModeTypesLinker.onNext(nil)
paymentModeTypesLinker.onNext(model.availableServices ?? []) paymentModeTypesLinker.onNext(model.availableServices ?? [])
guard var selectedRecipient = try? selectedRecipientLinker.value() else {
return
}
if model.countryCode != selectedRecipient.countryCode {
let countryEnum = CountryEnum(rawValue: selectedRecipient.countryCode?.lowercased() ?? "")
selectedRecipient.countryCode = model.countryCode
selectedRecipient.country = model.countryName
selectedRecipient.countryID = model.countryId
selectedRecipient.mobile = selectedRecipient.mobile?.replacingOccurrences(
of: countryEnum?.phoneCode ?? "",
with: ""
)
selectedRecipientLinker.onNext(selectedRecipient)
}
case .paymentMode: case .paymentMode:
guard let model = model as? PaymentServiceType else { return } guard let model = model as? PaymentServiceType else { return }
selectedPaymentModeTypesLinker.onNext(model) selectedPaymentModeTypesLinker.onNext(model)

Loading…
Cancel
Save