Guest User

Untitled

a guest
Feb 26th, 2018
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. val username = usernameTextfield.text
  2. val password = passwordTextfield.text
  3. async(CommonPool) {
  4. val valid = if (username.contains("@"))
  5. AccountRestClient.login(LoginBean(email = username, password = password)).isValid()
  6. else
  7. AccountRestClient.login(LoginBean(username = username, password = password)).isValid()
  8.  
  9. if (valid)
  10. postRunnable { changeScreen(LobbyScreen::class) }
  11. }
Add Comment
Please, Sign In to add comment