Do nothing if ids are empty. More logging.
This commit is contained in:
parent
edb5eabee7
commit
18946464a2
@ -1051,6 +1051,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
Crashlytics.logException(e)
|
Crashlytics.logException(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ids.isNotEmpty()) {
|
||||||
api.readAll(ids).enqueue(object : Callback<SuccessResponse> {
|
api.readAll(ids).enqueue(object : Callback<SuccessResponse> {
|
||||||
override fun onResponse(
|
override fun onResponse(
|
||||||
call: Call<SuccessResponse>,
|
call: Call<SuccessResponse>,
|
||||||
@ -1072,7 +1073,10 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
|
|
||||||
if (debugReadingItems) {
|
if (debugReadingItems) {
|
||||||
readAllDebug(
|
readAllDebug(
|
||||||
Throwable("Got response, but : response.body() (${response.body()}) != null && response.body()!!.isSuccess (${response.body()?.isSuccess})")
|
Throwable(
|
||||||
|
"Got response, but : response.body() (${response.body()}) != null && response.body()!!.isSuccess (${response.body()?.isSuccess})." +
|
||||||
|
"Request url was (${call.request().url()}), ids were $ids"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1094,6 +1098,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
items = ArrayList()
|
items = ArrayList()
|
||||||
if (items.isEmpty()) {
|
if (items.isEmpty()) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
|
Loading…
Reference in New Issue
Block a user