mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Fix: Crash if source was an empty string (Closes #114)
This commit is contained in:
parent
d2bec1e4b8
commit
b5229a1272
@ -1274,10 +1274,18 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
imageSource.toString().contains("github") -> holder.devIcon.load(imageSource)
|
||||
}
|
||||
holder.dev.setOnClickListener {
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, product?.source?.toUri()))
|
||||
product?.source?.let { link ->
|
||||
if (link.isNotEmpty()) {
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, link.toUri()))
|
||||
}
|
||||
}
|
||||
}
|
||||
holder.dev.setOnLongClickListener {
|
||||
product?.source?.let { copyLinkToClipboard(holder.dev, it) }
|
||||
product?.source?.let { link ->
|
||||
if (link.isNotEmpty()) {
|
||||
copyLinkToClipboard(holder.dev, link)
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user