[O] Encapsulate ui{} inside alarm.dismiss{}

This commit is contained in:
Hykilpikonna
2021-01-22 17:46:04 -05:00
parent aa602051d1
commit e1ff034115
2 changed files with 9 additions and 12 deletions
+8 -11
View File
@@ -92,23 +92,20 @@ class LoginVC: UIViewController
localStorage["pass"] = pass.sha256
localStorage["id"] = $0
ui
a.dismiss
{
a.dismiss
{
// Send feedback
if login { self.msg("Login success!", "Now you can use account features, yay!") }
else { self.msg("Registration success!", "Now you have an account, yay!") }
// Hide registration and show account detail view
AccountViewController.this.login()
}
// Send feedback
if login { self.msg("Login success!", "Now you can use account features, yay!") }
else { self.msg("Registration success!", "Now you have an account, yay!") }
// Hide registration and show account detail view
AccountViewController.this.login()
}
}
err:
{
print($0)
ui { a.dismiss { self.msg("An error occurred", "Maybe the server is on fire, just wait a few hours.") } }
a.dismiss { self.msg("An error occurred", "Maybe the server is on fire, just wait a few hours.") }
}
}