Fixed Download Concurrency issue

Fixed image not showing up after reader is paused and resumed
This commit is contained in:
tom5079
2020-09-26 11:07:35 +09:00
parent f7c45df9a6
commit db074df0f7
9 changed files with 36 additions and 61 deletions

View File

@@ -45,23 +45,24 @@ class TagChip(context: Context, _tag: Tag) : Chip(context) {
}.toMap()
init {
chipIcon = when(tag.area) {
when(tag.area) {
"male" -> {
setChipBackgroundColorResource(R.color.material_blue_700)
setTextColor(ContextCompat.getColor(context, android.R.color.white))
ContextCompat.getDrawable(context, R.drawable.gender_male_white)
setCloseIconTintResource(android.R.color.white)
chipIcon = ContextCompat.getDrawable(context, R.drawable.gender_male_white)
}
"female" -> {
setChipBackgroundColorResource(R.color.material_pink_600)
setTextColor(ContextCompat.getColor(context, android.R.color.white))
ContextCompat.getDrawable(context, R.drawable.gender_female_white)
setCloseIconTintResource(android.R.color.white)
chipIcon = ContextCompat.getDrawable(context, R.drawable.gender_female_white)
}
else -> null
}.also {
if (favoriteTags.contains(tag))
setChipBackgroundColorResource(R.color.material_orange_500)
}
if (favoriteTags.contains(tag))
setChipBackgroundColorResource(R.color.material_orange_500)
isCloseIconVisible = true
closeIcon = ContextCompat.getDrawable(context,
if (favoriteTags.contains(tag))