mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-14 11:29:18 +00:00
Update: Handle gitlab and kde source icons
This commit is contained in:
@ -1234,7 +1234,13 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
holder.devName.text = product?.author?.name?.replaceFirstChar {
|
||||
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
|
||||
}
|
||||
holder.devIcon.load(imageSource)
|
||||
when {
|
||||
imageSource.toString()
|
||||
.contains("kde.org") -> holder.devIcon.setImageResource(R.drawable.ic_kde)
|
||||
imageSource.toString()
|
||||
.contains("gitlab") -> holder.devIcon.setImageResource(R.drawable.ic_gitlab)
|
||||
imageSource.toString().contains("github") -> holder.devIcon.load(imageSource)
|
||||
}
|
||||
holder.dev.setOnClickListener {
|
||||
context.startActivity(Intent(Intent.ACTION_VIEW, product?.source?.toUri()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user