Use Swift 5.7 if-let style

This commit is contained in:
Arkadiusz Fal
2022-09-28 16:27:01 +02:00
parent 8f96a7c5e0
commit a086a0f440
50 changed files with 114 additions and 114 deletions

View File

@@ -28,7 +28,7 @@ final class InstancesManifest: Service, ObservableObject {
}
func setPublicAccount(_ country: String?, accounts: AccountsModel, asCurrent: Bool = true) {
guard let country = country else {
guard let country else {
accounts.publicAccount = nil
if asCurrent {
accounts.configureAccount()
@@ -68,7 +68,7 @@ final class InstancesManifest: Service, ObservableObject {
instance = countryInstances.randomElement() ?? regionInstances.randomElement()
}
guard let instance = instance else {
guard let instance else {
settings.presentAlert(title: "Could not change location", message: "No locations available at the moment")
return
}