Commit d7b47a52 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 0f079764
......@@ -64,6 +64,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
private var isInited = false
private var drama: DPDrama? = null
private var tipList: ArrayList<String>? = null
private var orderTagsList: ArrayList<String>? = null
private var mInitUnlockIndex = 0
......@@ -103,6 +104,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
isPlayNext = extras?.getBoolean(Constant.VEDIO_NEXT, false) == true
mVedioBean = Gson().fromJson(json, VedioBean::class.java)
orderTagsList = mVedioBean?.orderTags
freeSet = mVedioBean!!.unlockIndex
lockSet = if (mVedioBean!!.adGiveVedioNum == 0) 1 else mVedioBean!!.adGiveVedioNum
......@@ -359,6 +361,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
blockView?.visibility = View.GONE
}
mVedioBean!!.seeIndex = index
mVedioBean!!.orderTags = orderTagsList
LocalVedioManager.commitVedio(mVedioBean!!)
showVipCountDialog(index - 1)
......
......@@ -40,6 +40,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private var mVedioBean: VedioBean? = null
private var indexBean: IndexList? = null
private var tipList: ArrayList<String>? = null
private var orderTagsList: ArrayList<String>? = null
private var isPlayNext = false
private var playIndex = 1
......@@ -56,7 +57,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
val json = extras?.getString(Constant.VEDIO_BEAN)
isPlayNext = extras?.getBoolean(Constant.VEDIO_NEXT, false) == true
mVedioBean = Gson().fromJson(json, VedioBean::class.java)
orderTagsList = mVedioBean?.orderTags
super.getBundleExtras(extras)
}
......@@ -93,6 +94,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
// VIdeoindex -> seeIndex
if (videos.size > it) {
mVedioBean!!.seeIndex = videos[it].vedioIndex
mVedioBean!!.orderTags=orderTagsList
LocalVedioManager.commitVedio(mVedioBean!!)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment