Skip to content

Commit

Permalink
Merge branch 'master' into version/0.34
Browse files Browse the repository at this point in the history
  • Loading branch information
ealymbaev committed Jun 21, 2023
2 parents 260f04b + 3555df7 commit 1e3c073
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10187,7 +10187,7 @@
repositoryURL = "https://github.com/horizontalsystems/MarketKit.Swift";
requirement = {
kind = exactVersion;
version = 2.0.9;
version = 2.0.10;
};
};
D3604E7128F03B0A0066C366 /* XCRemoteSwiftPackageReference "ScanQrKit.Swift" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class ActivateSubscriptionViewController: ThemeViewController {
viewModel.finishPublisher
.receive(on: DispatchQueue.main)
.sink { [weak self] in
HudHelper.instance.showSuccessBanner()
HudHelper.instance.show(banner: .success(string: "activate_subscription.activated".localized))
self?.dismiss(animated: true)
}
.store(in: &cancellables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ extension ContactBookService {
try contactManager.backupContacts(from: url)
}

func replace(contacts: [BackupContact]) {
try? contactManager.restore(contacts: contacts)
func replace(contacts: [BackupContact]) throws {
try contactManager.restore(contacts: contacts)
}

func blockchainName(blockchainUid: String) -> String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ class ContactBookViewController: ThemeSearchViewController {
subscribe(disposeBag, viewModel.viewItemsDriver) { [weak self] in self?.onUpdate(viewItems: $0) }
subscribe(disposeBag, viewModel.emptyListDriver) { [weak self] in self?.set(emptyList: $0) }
subscribe(disposeBag, viewModel.showRestoreAlertSignal) { [weak self] in self?.showRestoreAlert(contacts: $0) }
subscribe(disposeBag, viewModel.showSuccessfulRestoreSignal) { HudHelper.instance.showSuccessBanner() }
subscribe(disposeBag, viewModel.showSuccessfulRestoreSignal) { HudHelper.instance.show(banner: .success(string: "contacts.restore.restored".localized)) }
subscribe(disposeBag, viewModel.showParsingErrorSignal) { [weak self] in self?.showParsingError() }
subscribe(disposeBag, viewModel.showStorageErrorSignal) { [weak self] in self?.showStorageError() }
subscribe(disposeBag, viewModel.showRestoreErrorSignal) { [weak self] in self?.showRestoreError() }

tableView.buildSections()

Expand Down Expand Up @@ -131,8 +131,8 @@ class ContactBookViewController: ThemeSearchViewController {
HudHelper.instance.show(banner: .error(string: "contacts.restore.parsing_error".localized))
}

private func showStorageError() {
HudHelper.instance.show(banner: .error(string: "contacts.restore.storage_error".localized))
private func showRestoreError() {
HudHelper.instance.show(banner: .error(string: "contacts.restore.restore_error".localized))
}

@objc private func onTapMore() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ContactBookViewModel {
private let showRestoreAlertRelay = PublishRelay<[BackupContact]>()
private let showSuccessfulRestoreRelay = PublishRelay<()>()
private let showParsingErrorRelay = PublishRelay<()>()
private let showStorageErrorRelay = PublishRelay<()>()
private let showRestoreErrorRelay = PublishRelay<()>()

init(service: ContactBookService) {
self.service = service
Expand Down Expand Up @@ -83,8 +83,8 @@ extension ContactBookViewModel {
showParsingErrorRelay.asSignal()
}

var showStorageErrorSignal: Signal<()> {
showStorageErrorRelay.asSignal()
var showRestoreErrorSignal: Signal<()> {
showRestoreErrorRelay.asSignal()
}

func contactAddress(contactUid: String, blockchainUid: String) -> ContactAddress? {
Expand All @@ -111,7 +111,12 @@ extension ContactBookViewModel {
}

func replace(contacts: [BackupContact]) {
service.replace(contacts: contacts)
do {
try service.replace(contacts: contacts)
showSuccessfulRestoreRelay.accept(())
} catch {
showRestoreErrorRelay.accept(())
}
}

func blockchainName(blockchainUid: String) -> String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,12 +1049,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Adresse löschen";

"contacts.restore.restored" = "Wiederhergestellt";
"contacts.restore.parsing_error" = "Datei hat falsche Daten!";
"contacts.restore.storage_error" = "Kontakte können nicht gespeichert werden!";
"contacts.restore.restore_error" = "Wiederherstellung der Kontakte fehlgeschlagen";
"contacts.restore.overwrite_alert.description" = "Diese Aktion wird Ihre lokalen Zahlungskontakte sowie die iCloud-Kopie (falls vorhanden) überschreiben.";
"contacts.restore.overwrite_alert.replace" = "Ersetzen";


"contacts.add_address.title" = "Adresse hinzufügen";
"contacts.add_address.create_new" = "Neuen Kontakt erstellen";
"contacts.add_address.add_to_contact" = "Zu vorhandenem Kontakt hinzufügen";
Expand Down Expand Up @@ -1516,7 +1516,7 @@
"activate_subscription.sign" = "Signieren";
"activate_subscription.activating" = "Activating...";
"activate_subscription.failed_to_activate" = "Failed to activate subscription";

"activate_subscription.activated" = "Activated";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,12 +1071,12 @@ Go to Settings - > Unstoppable and allow access to the camera.";
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Delete Address";

"contacts.restore.restored" = "Restored";
"contacts.restore.parsing_error" = "File has wrong data!";
"contacts.restore.storage_error" = "Can't save contacts!";
"contacts.restore.restore_error" = "Failed to restore contacts";
"contacts.restore.overwrite_alert.description" = "This action will overwrite your local payment contacts as well as its iCloud copy (if there is one).";
"contacts.restore.overwrite_alert.replace" = "Replace";


"contacts.add_address.title" = "Add Address";
"contacts.add_address.create_new" = "Create New Contact";
"contacts.add_address.add_to_contact" = "Add to Existing Contact";
Expand Down Expand Up @@ -1538,7 +1538,7 @@ Go to Settings - > Unstoppable and allow access to the camera.";
"activate_subscription.sign" = "Sign";
"activate_subscription.activating" = "Activating...";
"activate_subscription.failed_to_activate" = "Failed to activate subscription";

"activate_subscription.activated" = "Activated";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Eliminar dirección";

"contacts.restore.restored" = "Restaurado";
"contacts.restore.parsing_error" = "¡El archivo tiene datos incorrectos!";
"contacts.restore.storage_error" = "¡No se pueden guardar contactos!";
"contacts.restore.restore_error" = "Error al restaurar contactos";
"contacts.restore.overwrite_alert.description" = "Esta acción sobrescribirá sus contactos de pago locales, así como su copia de iCloud (si hay una).";
"contacts.restore.overwrite_alert.replace" = "Reemplazar";


"contacts.add_address.title" = "Añadir dirección";
"contacts.add_address.create_new" = "Crear nuevo contacto";
"contacts.add_address.add_to_contact" = "Añadir al contacto existente";
Expand Down Expand Up @@ -1515,7 +1515,7 @@
"activate_subscription.sign" = "Firma";
"activate_subscription.activating" = "Activando...";
"activate_subscription.failed_to_activate" = "Error al activar la suscripción";

"activate_subscription.activated" = "Activado";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Supprimer l'adresse";

"contacts.restore.restored" = "Restauré";
"contacts.restore.parsing_error" = "Le fichier contient des données incorrectes !";
"contacts.restore.storage_error" = "Impossible d'enregistrer les contacts !";
"contacts.restore.restore_error" = "Impossible de restaurer les contacts";
"contacts.restore.overwrite_alert.description" = "Cette action écrasera vos contacts de paiement locaux ainsi que la copie iCloud (s'il y en a une).";
"contacts.restore.overwrite_alert.replace" = "Remplacer";


"contacts.add_address.title" = "Ajouter une adresse";
"contacts.add_address.create_new" = "Créer un nouveau contact";
"contacts.add_address.add_to_contact" = "Ajouter au contact existant";
Expand Down Expand Up @@ -1516,7 +1516,7 @@
"activate_subscription.sign" = "Signer";
"activate_subscription.activating" = "Activation...";
"activate_subscription.failed_to_activate" = "Impossible d'activer l'abonnement";

"activate_subscription.activated" = "Activé";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "주소 삭제 ";

"contacts.restore.restored" = "복원됨";
"contacts.restore.parsing_error" = "파일에 잘못된 데이터가 있습니다!";
"contacts.restore.storage_error" = "연락처를 저장할 수 없습니다!";
"contacts.restore.restore_error" = "연락처 복원에 실패했습니다";
"contacts.restore.overwrite_alert.description" = "이 작업은 로컬 결제 연락처와 iCloud 복사본(있는 경우)을 덮어씁니다.";
"contacts.restore.overwrite_alert.replace" = "위젯 변경";


"contacts.add_address.title" = "주소 추가";
"contacts.add_address.create_new" = "새 연락처 등록";
"contacts.add_address.add_to_contact" = "기존 연락처에 추가";
Expand Down Expand Up @@ -1515,7 +1515,7 @@
"activate_subscription.sign" = "가입";
"activate_subscription.activating" = "Activating...";
"activate_subscription.failed_to_activate" = "Failed to activate subscription";

"activate_subscription.activated" = "Activated";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1050,12 +1050,12 @@ Vá para Configurações → \"Unstoppable\" e permita o acesso à câmera.";
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Excluir endereço";

"contacts.restore.restored" = "Restaurado";
"contacts.restore.parsing_error" = "O arquivo tem dados errados!";
"contacts.restore.storage_error" = "Não é possível salvar os contatos!";
"contacts.restore.restore_error" = "Erro ao restaurar contatos";
"contacts.restore.overwrite_alert.description" = "Esta ação substituirá seus contatos de pagamento locais, bem como sua cópia do iCloud (se houver uma).";
"contacts.restore.overwrite_alert.replace" = "Substituir";


"contacts.add_address.title" = "Adicionar endereço";
"contacts.add_address.create_new" = "Criar Novo Contato";
"contacts.add_address.add_to_contact" = "Adicionar ao Contato Existente";
Expand Down Expand Up @@ -1517,7 +1517,7 @@ Vá para Configurações → \"Unstoppable\" e permita o acesso à câmera.";
"activate_subscription.sign" = "Assinar";
"activate_subscription.activating" = "Ativando...";
"activate_subscription.failed_to_activate" = "Falha ao ativar a assinatura";

"activate_subscription.activated" = "Ativado";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,12 +1052,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Удалить адрес";

"contacts.restore.restored" = "Восстановлено";
"contacts.restore.parsing_error" = "Файл имеет неправильные данные!";
"contacts.restore.storage_error" = "Не удается сохранить контакты!";
"contacts.restore.restore_error" = "Не удалось восстановить контакты";
"contacts.restore.overwrite_alert.description" = "Это действие перезапишет ваши локальные платежные контакты, а также их копии в iCloud (при наличии таковых).";
"contacts.restore.overwrite_alert.replace" = "Заменить";


"contacts.add_address.title" = "Добавить адрес";
"contacts.add_address.create_new" = "Создать новый контакт";
"contacts.add_address.add_to_contact" = "Добавить в существующий контакт";
Expand Down Expand Up @@ -1521,7 +1521,7 @@
"activate_subscription.sign" = "Подписать";
"activate_subscription.activating" = "Активация...";
"activate_subscription.failed_to_activate" = "Не удалось активировать подписку";

"activate_subscription.activated" = "Активировано";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1050,12 +1050,12 @@ Ayarlar - > Unstoppable ekranına giderek kamera erişimine izin verin.";
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "Adresi Sil";

"contacts.restore.restored" = "Restored";
"contacts.restore.parsing_error" = "Dosyada yanlış veriler var!";
"contacts.restore.storage_error" = "Kişiler kaydedilemiyor!";
"contacts.restore.restore_error" = "Failed to restore contacts ";
"contacts.restore.overwrite_alert.description" = "Bu işlem, cihazdaki ödeme kişilerinizin yanı sıra iCloud kopyasının (varsa) üzerine yazacaktır.";
"contacts.restore.overwrite_alert.replace" = "Değiştir";


"contacts.add_address.title" = "Adres ekle";
"contacts.add_address.create_new" = "Yeni Kişi Oluştur";
"contacts.add_address.add_to_contact" = "Mevcut Kişiye Ekle";
Expand Down Expand Up @@ -1517,7 +1517,7 @@ Ayarlar - > Unstoppable ekranına giderek kamera erişimine izin verin.";
"activate_subscription.sign" = "kaydol";
"activate_subscription.activating" = "Activating...";
"activate_subscription.failed_to_activate" = "Failed to activate subscription";

"activate_subscription.activated" = "Activated";

// Launch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,12 +1051,12 @@
"contacts.contact.address.blockchain" = "Blockchain";
"contacts.contact.address.delete_address" = "删除地址";

"contacts.restore.restored" = "恢复";
"contacts.restore.parsing_error" = "文件包含错误数据!";
"contacts.restore.storage_error" = "无法保存联系人!";
"contacts.restore.restore_error" = "无法恢复联系人";
"contacts.restore.overwrite_alert.description" = "此操作将覆盖您的本地付款联系人以及它的 iCloud 副本(如有)。";
"contacts.restore.overwrite_alert.replace" = "替换";


"contacts.add_address.title" = "添加地址";
"contacts.add_address.create_new" = "创建新联系人";
"contacts.add_address.add_to_contact" = "添加到现有联系人";
Expand Down Expand Up @@ -1518,7 +1518,7 @@
"activate_subscription.sign" = "签名";
"activate_subscription.activating" = "激活";
"activate_subscription.failed_to_activate" = "订阅激活失败";

"activate_subscription.activated" = "已激活";

// Launch

Expand Down

0 comments on commit 1e3c073

Please sign in to comment.