Guest User

Untitled

a guest
Oct 10th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. fun showUserOrders(username: String, password: String) = GlobalScope.launch(Dispatchers.Main) {
  2. val user = withContext(Dispatchers.Default) { login(username, password) }
  3. val orders = withContext(Dispatchers.Default) { fetchUserOrders(user.userId) }
  4. showUserOrders(orders)
  5. }
  6.  
  7. suspend fun login(username: String, password: String) { }
  8.  
  9. suspend fun fetchUserOrders(userId: Long) { }
Add Comment
Please, Sign In to add comment