RichEditor onVideoClick 进行Catch操作
This commit is contained in:
@ -56,18 +56,22 @@ class OnLinkClickListener(val context: Context,
|
||||
|
||||
@JavascriptInterface
|
||||
fun onVideoClick(content: String) {
|
||||
val videoEntity = GsonUtils.fromJson(content, MyVideoEntity::class.java)
|
||||
if (videoEntity.status == "pass") {
|
||||
DirectUtils.directToVideoDetail(context,
|
||||
videoEntity.id,
|
||||
VideoDetailContainerViewModel.Location.VIDEO_HOT.value,
|
||||
showComment = false,
|
||||
entrance = entrance,
|
||||
path = "$path-视频")
|
||||
} else if (videoEntity.status == "fail") {
|
||||
Utils.toast(context, "视频审核未通过")
|
||||
} else if (videoEntity.status == "pending") {
|
||||
Utils.toast(context, "视频正在审核中")
|
||||
AppExecutor.uiExecutor.execute {
|
||||
tryWithDefaultCatch {
|
||||
val videoEntity = GsonUtils.fromJson(content, MyVideoEntity::class.java)
|
||||
if (videoEntity.status == "pass") {
|
||||
DirectUtils.directToVideoDetail(context,
|
||||
videoEntity.id,
|
||||
VideoDetailContainerViewModel.Location.VIDEO_HOT.value,
|
||||
showComment = false,
|
||||
entrance = entrance,
|
||||
path = "$path-视频")
|
||||
} else if (videoEntity.status == "fail") {
|
||||
Utils.toast(context, "视频审核未通过")
|
||||
} else if (videoEntity.status == "pending") {
|
||||
Utils.toast(context, "视频正在审核中")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user