同步peko:修复升级弹窗偶发异常
This commit is contained in:
@@ -15,7 +15,7 @@ import java.lang.reflect.ParameterizedType
|
|||||||
abstract class BaseDialog<T : ViewBinding> : RxDialogFragment() {
|
abstract class BaseDialog<T : ViewBinding> : RxDialogFragment() {
|
||||||
|
|
||||||
val isViewLoaded: Boolean get() = _binding != null
|
val isViewLoaded: Boolean get() = _binding != null
|
||||||
private var _binding: T? = null
|
protected var _binding: T? = null
|
||||||
private var onDismissListener: (() -> Unit)? = null
|
private var onDismissListener: (() -> Unit)? = null
|
||||||
val binding get() = _binding!!
|
val binding get() = _binding!!
|
||||||
open var width = ScreenUtil.getDialogWidth()
|
open var width = ScreenUtil.getDialogWidth()
|
||||||
|
@@ -57,8 +57,10 @@ class VipUpgradeDialog : BaseDialog<DialogVipUpgradeBinding>() {
|
|||||||
.decodeFromURL(URL(vipInfo.vipLogo), object : SVGAParser.ParseCompletion {
|
.decodeFromURL(URL(vipInfo.vipLogo), object : SVGAParser.ParseCompletion {
|
||||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||||
val drawable = SVGADrawable(videoItem)
|
val drawable = SVGADrawable(videoItem)
|
||||||
binding?.ivVipIcon?.setImageDrawable(drawable)
|
if (isViewLoaded) {
|
||||||
binding?.ivVipIcon?.startAnimation()
|
_binding?.ivVipIcon?.setImageDrawable(drawable)
|
||||||
|
_binding?.ivVipIcon?.startAnimation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError() {
|
override fun onError() {
|
||||||
|
Reference in New Issue
Block a user