视频埋点增加[提交评论]事件
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
package com.gh.gamecenter.eventbus;
|
||||
|
||||
public class EBCommentSuccess {
|
||||
|
||||
}
|
||||
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user