刷视频 和 看完视频 都需要处理逻辑
This commit is contained in:
parent
54d943869f
commit
c55cf6baf0
|
|
@ -52,6 +52,7 @@ import com.gamedog.vididin.main.fragments.home.YoutubeUiState as UiState
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class HomeFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnSwitchTabListener, OnFragmentBackgroundListener {
|
class HomeFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnSwitchTabListener, OnFragmentBackgroundListener {
|
||||||
private var mWatchedVideoTotal = 0
|
private var mWatchedVideoTotal = 0
|
||||||
|
private var mSwipedVideoTotal = 0
|
||||||
private var mHasShowGuide: Boolean = false
|
private var mHasShowGuide: Boolean = false
|
||||||
private var mTotalMs: Long = 0L
|
private var mTotalMs: Long = 0L
|
||||||
override val mViewModel: ViewModel by viewModels()
|
override val mViewModel: ViewModel by viewModels()
|
||||||
|
|
@ -188,6 +189,10 @@ class HomeFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnSwit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun handleEventOneVideoSwiped() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleWatchTimeTick() {
|
private fun handleWatchTimeTick() {
|
||||||
mTotalMs += Check_Interval_MS
|
mTotalMs += Check_Interval_MS
|
||||||
|
|
||||||
|
|
@ -211,6 +216,8 @@ class HomeFragment : AppViewsFragment<ViewBinding, UiState, ViewModel>(), OnSwit
|
||||||
setHomeTabStyle(fragment)
|
setHomeTabStyle(fragment)
|
||||||
val curFragment: HomeItemFragment = fragment as HomeItemFragment
|
val curFragment: HomeItemFragment = fragment as HomeItemFragment
|
||||||
curFragment.loadVideo()
|
curFragment.loadVideo()
|
||||||
|
|
||||||
|
handleEventOneVideoSwiped()
|
||||||
}
|
}
|
||||||
|
|
||||||
// load more
|
// load more
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue