Skip to content

Commit 337292c

Browse files
authored
Update NewsActivity.kt
1 parent 7dc038a commit 337292c

File tree

1 file changed

+1
-2
lines changed
  • app/src/main/java/com/training/coroutinepackdemo/ui/newsList/view

1 file changed

+1
-2
lines changed

app/src/main/java/com/training/coroutinepackdemo/ui/newsList/view/NewsActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ class NewsActivity : AppCompatActivity() {
6363
}
6464
Status.LOADING -> {
6565
progressbar.visibility = View.VISIBLE
66-
recyclerView.visibility = View.GONE
6766
}
6867
Status.ERROR -> {
6968
//Handle Error
7069
progressbar.visibility = View.GONE
7170
recyclerView.visibility = View.VISIBLE
72-
Toast.makeText(this, "Something went wrong,please try again", Toast.LENGTH_LONG).show()
71+
Toast.makeText(this, it.message, Toast.LENGTH_LONG).show()
7372
}
7473
}
7574
})

0 commit comments

Comments
 (0)