Skip to content

Commit

Permalink
fix: NPE when image url is not given (#3863)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikaysharma01 committed Mar 3, 2021
1 parent 57a6272 commit 87b4bd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -811,7 +811,7 @@ class SummaryProductFragment : BaseFragment(), ISummaryProductPresenter.View {
productBarcode,
productName.orEmpty(),
productDetails,
imageUrl!!
imageUrl.orEmpty()
)
addToListRecyclerView.layoutManager = LinearLayoutManager(activity)
addToListRecyclerView.adapter = addToListAdapter
Expand Down
Expand Up @@ -35,7 +35,7 @@ class ProductListAdapter(
holder.tvDetails.text = products[position].productDetails
holder.tvBarcode.text = products[position].barcode

if (!isLowBatteryMode) {
if (!isLowBatteryMode && products[position].imageUrl.isNotEmpty()) {
Picasso.get()
.load(products[position].imageUrl)
.placeholder(R.drawable.placeholder_thumb)
Expand Down

0 comments on commit 87b4bd7

Please sign in to comment.