视频埋点增加[提交评论]事件

This commit is contained in:
张玉久
2020-11-18 18:01:31 +08:00
parent 0cacc15e7d
commit 75bdf6f251
3 changed files with 27 additions and 9 deletions

View File

@ -0,0 +1,5 @@
package com.gh.gamecenter.eventbus;
public class EBCommentSuccess {
}

View File

@ -29,6 +29,7 @@ import com.gh.gamecenter.adapter.OnCommentCallBackListener
import com.gh.gamecenter.baselist.ListAdapter
import com.gh.gamecenter.baselist.ListFragment
import com.gh.gamecenter.entity.CommentEntity
import com.gh.gamecenter.eventbus.EBCommentSuccess
import com.gh.gamecenter.eventbus.EBDeleteComment
import com.gh.gamecenter.eventbus.EBReuse
import com.gh.gamecenter.qa.answer.detail.AnswerDetailFragment
@ -136,15 +137,21 @@ open class NewCommentFragment : ListFragment<CommentEntity, NewCommentViewModel>
}
commentEt.postDelayed({ setSoftInput(false) }, 100)
if (mCommentType == CommentType.COMMUNITY_ARTICLE) {
SyncPageRepository.postSyncData(SyncDataEntity(mArticleId,
SyncFieldConstants.ARTICLE_COMMENT_COUNT,
mCommentCount,
checkFieldEntity = true))
} else if (mCommentType == CommentType.ANSWER) {
SyncPageRepository.postSyncData(SyncDataEntity(mAnswerId,
SyncFieldConstants.ANSWER_COMMENT_COUNT,
mCommentCount))
when (mCommentType) {
CommentType.COMMUNITY_ARTICLE -> {
SyncPageRepository.postSyncData(SyncDataEntity(mArticleId,
SyncFieldConstants.ARTICLE_COMMENT_COUNT,
mCommentCount,
checkFieldEntity = true))
}
CommentType.ANSWER -> {
SyncPageRepository.postSyncData(SyncDataEntity(mAnswerId,
SyncFieldConstants.ANSWER_COMMENT_COUNT,
mCommentCount))
}
CommentType.VIDEO -> {
EventBus.getDefault().post(EBCommentSuccess())
}
}
if (mShowInputOnly) {

View File

@ -678,6 +678,12 @@ class VideoDetailContainerFragment : BaseLazyFragment(), OnBackPressedListener {
}
}
//评论成功
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(commentSuccess: EBCommentSuccess) {
findVisibleVideoViewByPosition()?.uploadVideoStreamingPlaying("提交评论")
}
//下载被删除事件
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventMainThread(status: EBDownloadStatus) {