Guest User

Untitled

a guest
Oct 19th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. class MainActivity : : BaseActivity() {
  2.  
  3. override fun onCreate(savedInstanceState: Bundle?) {
  4. super.onCreate(savedInstanceState)
  5. loadArticles()
  6. }
  7.  
  8. fun loadArticles() {
  9. val progress = showLoading()
  10. auth.userId.then {
  11. serviceManager.articlesByUser(it)
  12. }.then {
  13. it.filter{it.status == Status.NEW}
  14. }.then{
  15. progress.dismiss()
  16. items = it
  17. adapter.notifyDataSetChanged()
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment