|
@@ -21,14 +21,14 @@ class AudioSeatAdapter :
|
|
|
}
|
|
|
|
|
|
private val svgaVideoEntityMap: MutableMap<Int, OldSeatModel?> = mutableMapOf(
|
|
|
+ 0 to null,
|
|
|
1 to null,
|
|
|
2 to null,
|
|
|
3 to null,
|
|
|
4 to null,
|
|
|
5 to null,
|
|
|
6 to null,
|
|
|
- 7 to null,
|
|
|
- 8 to null
|
|
|
+ 7 to null
|
|
|
)
|
|
|
|
|
|
override fun convert(helper: BaseViewHolder?, item: AudioSeatModel?) {
|
|
@@ -79,7 +79,7 @@ class AudioSeatAdapter :
|
|
|
svgaParser.decodeFromURL(URL(it.head_special), object :SVGAParser.ParseCompletion{
|
|
|
override fun onComplete(videoItem: SVGAVideoEntity) {
|
|
|
val drawable = SVGADrawable(videoItem)
|
|
|
- svgaVideoEntityMap[adapterPosition] = OldSeatModel(drawable,it.head_special)
|
|
|
+ svgaVideoEntityMap[adapterPosition] = OldSeatModel(videoItem,it.head_special)
|
|
|
svgAvatar.setImageDrawable(drawable)
|
|
|
svgAvatar.startAnimation()
|
|
|
}
|
|
@@ -89,7 +89,8 @@ class AudioSeatAdapter :
|
|
|
})
|
|
|
} else {
|
|
|
svgaVideoEntityMap[adapterPosition]?.let { oldSeat ->
|
|
|
- svgAvatar.setImageDrawable(oldSeat.drawable)
|
|
|
+ val drawable = SVGADrawable(oldSeat.drawable)
|
|
|
+ svgAvatar.setImageDrawable(drawable)
|
|
|
svgAvatar.startAnimation()
|
|
|
}
|
|
|
|
|
@@ -106,5 +107,5 @@ class AudioSeatAdapter :
|
|
|
|
|
|
}
|
|
|
|
|
|
- data class OldSeatModel(val drawable: SVGADrawable,val url:String?)
|
|
|
+ data class OldSeatModel(val drawable: SVGAVideoEntity,val url:String?)
|
|
|
}
|