Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.92 KB | None | 0 0
  1. val users: HashMap<Int, User> = HashMap()
  2. val groups: HashMap<Int, Group> = HashMap()
  3.  
  4. val usersIds = ArrayList<Int>()
  5. val groupsIds = ArrayList<Int>()
  6.  
  7. if (bar()) {
  8.     asyncCallWithListener(
  9.         usersIdsToLoad,
  10.         groupsIdsToLoad,
  11.         listener = object : ResponseListener {
  12.             override fun success(result: ResponseWithUsersAndGroups) {
  13.                 if (result.users.isNotEmpty() || result.groups.isNotEmpty()) {
  14.                     mIoScope.launch {
  15.                         bazz()
  16.  
  17.                         Manager.notify(users, groups, someConst)
  18.                     }
  19.                 } else {
  20.                     Manager.notify(users, groups, someConst)
  21.                 }
  22.             }
  23.  
  24.             override fun fail(error: Exception) {
  25.                 Manager.notify(users, groups, someConst)
  26.             }
  27.         }
  28.     )
  29. } else {
  30.     Manager.notify(users, groups, someConst)
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement