Simplify existing host lookup

This commit is contained in:
Davide De Rosa 2020-05-11 22:28:10 +02:00
parent c4d1419c73
commit 52e136e9c7
2 changed files with 3 additions and 3 deletions

View File

@ -112,8 +112,8 @@ class WizardHostViewController: UITableViewController, StrongTableHost {
let service = TransientStore.shared.service
replacedProfile = nil
if let existingHostId = service.existingHostId(withTitle: enteredTitle) {
replacedProfile = service.profile(withContext: profile.context, id: existingHostId)
if let existingProfile = service.hostProfile(withTitle: enteredTitle) {
replacedProfile = existingProfile
let alert = UIAlertController.asAlert(title, L10n.Core.Wizards.Host.Alerts.Existing.message)
alert.addPreferredAction(L10n.Core.Global.ok) {
self.next(withProfile: profile, title: enteredTitle)

@ -1 +1 @@
Subproject commit 79e77c4f4673cf8072e4f6eab056a80c2f53c68c
Subproject commit c9662caa172e1406352c68b931ca3bb2cc5011a3