修改视频流非Wifi弹窗只弹一次

This commit is contained in:
Jack
2020-03-05 15:41:35 +08:00
parent 42dae5c993
commit e7073bf010

View File

@ -372,21 +372,26 @@ class DetailPlayerView @JvmOverloads constructor(context: Context, attrs: Attrib
startPlayLogic()
return
}
DialogUtils.showAlertDialog(
context,
"注意",
"您当前使用的移动网络,确定要继续播放视频吗?",
"继续播放",
"暂时不了",
{
HaloApp.put(Constants.SHOULD_SHOW_VIDEO_MOBILE_WARNING, false)
startPlayLogic()
},
{
if (mViewModel?.isHomeVideo == false) {
(context as Activity).finish()
}
})
if (nonWifiTips) {
DialogUtils.showAlertDialog(
context,
"注意",
"您当前使用的移动网络,确定要继续播放视频吗?",
"继续播放",
"暂时不了",
{
HaloApp.put(Constants.SHOULD_SHOW_VIDEO_MOBILE_WARNING, false)
SPUtils.setBoolean(Constants.SP_NON_WIFI_TIPS, false)
startPlayLogic()
},
{
if (mViewModel?.isHomeVideo == false) {
(context as Activity).finish()
}
})
} else {
startPlayLogic()
}
}
fun updateThumb(url: String) {