Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MainActivity : : BaseActivity() {
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- loadArticles()
- }
- fun loadArticles() {
- val progress = showLoading()
- auth.userId.then {
- serviceManager.articlesByUser(it)
- }.then {
- it.filter{it.status == Status.NEW}
- }.then{
- progress.dismiss()
- items = it
- adapter.notifyDataSetChanged()
- }
- }
- }
Add Comment
Please, Sign In to add comment