光环助手V3.7.0 DEV(20190918-1830)视频上传(测试汇总)(2.3.7.8.9.10.11.13.15.16.18.19.20.21) https://gitlab.ghzs.com/pm/halo-app-issues/issues/657
This commit is contained in:
@ -224,6 +224,12 @@ public abstract class BaseActivity extends BaseToolBarActivity implements EasyPe
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param entrance 上一个页面的链式入口名称
|
||||
* @param path 当前页面名称
|
||||
* @return 完整的链式入口名称
|
||||
*/
|
||||
public static String mergeEntranceAndPath(String entrance, String path) {
|
||||
if (TextUtils.isEmpty(entrance) && TextUtils.isEmpty(path)) return "";
|
||||
if (TextUtils.isEmpty(entrance) && !TextUtils.isEmpty(path)) {
|
||||
|
||||
@ -111,7 +111,7 @@ object ErrorHelper {
|
||||
403016 -> Utils.toast(context, "标签内容可能包含敏感信息,请修改后再提交")
|
||||
403018 -> Utils.toast(context, R.string.comment_failed_unable)
|
||||
403070 -> Utils.toast(context, "请勿重复提交~")
|
||||
403073 -> Utils.toast(context, "内容可能存在敏感词信息,请重新修改")
|
||||
403073 -> Utils.toast(context, "标题可能包含敏感词,请修改后再提交")
|
||||
|
||||
403020 -> if (showHighPriorityHint) {
|
||||
DialogUtils.showAlertDialog(context,
|
||||
|
||||
@ -5,6 +5,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.util.DirectUtils
|
||||
import com.gh.common.util.ImageUtils
|
||||
import com.gh.common.util.toSimpleCount
|
||||
import com.gh.gamecenter.R
|
||||
@ -14,6 +15,7 @@ import com.gh.gamecenter.baselist.NormalListViewModel
|
||||
import com.gh.gamecenter.databinding.VideoItemBinding
|
||||
import com.gh.gamecenter.entity.MyVideoEntity
|
||||
import com.gh.gamecenter.video.VideoItemViewHolder
|
||||
import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel
|
||||
|
||||
class VideoAdapter(context: Context,
|
||||
val mViewModel: NormalListViewModel<MyVideoEntity>) : ListAdapter<MyVideoEntity>(context) {
|
||||
@ -46,6 +48,9 @@ class VideoAdapter(context: Context,
|
||||
val entity = mEntityList[position]
|
||||
ImageUtils.display(holder.binding.videoCover, entity.poster)
|
||||
holder.binding.videoLikeCount.text = entity.vote.toSimpleCount()
|
||||
holder.itemView.setOnClickListener {
|
||||
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_UPLOADED_VIDEO.value, false, "(视频投稿)")
|
||||
}
|
||||
} else if (holder is FooterViewHolder) {
|
||||
holder.initFooterViewHolder(mViewModel, mIsLoading, mIsNetworkError, mIsOver)
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.gh.common.constant.ItemViewType
|
||||
import com.gh.common.util.DirectUtils
|
||||
import com.gh.common.util.ImageUtils
|
||||
import com.gh.common.util.toSimpleCount
|
||||
import com.gh.gamecenter.R
|
||||
@ -14,6 +15,7 @@ import com.gh.gamecenter.baselist.NormalListViewModel
|
||||
import com.gh.gamecenter.databinding.VideoItemBinding
|
||||
import com.gh.gamecenter.entity.MyVideoEntity
|
||||
import com.gh.gamecenter.video.VideoItemViewHolder
|
||||
import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel
|
||||
|
||||
|
||||
class MyVideoAdapter(context: Context,
|
||||
@ -48,6 +50,9 @@ class MyVideoAdapter(context: Context,
|
||||
val entity = mEntityList[position]
|
||||
ImageUtils.display(holder.binding.videoCover, entity.poster)
|
||||
holder.binding.videoLikeCount.text = entity.vote.toSimpleCount()
|
||||
holder.itemView.setOnClickListener {
|
||||
DirectUtils.directToVideoDetail(mContext, entity.id, VideoDetailContainerViewModel.Location.USER_UPLOADED_VIDEO.value, false, "(视频投稿)")
|
||||
}
|
||||
} else if (holder is FooterViewHolder) {
|
||||
holder.initFooterViewHolder(mViewModel, mIsLoading, mIsNetworkError, mIsOver)
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.entity.VideoEntity
|
||||
import com.gh.gamecenter.manager.UserManager
|
||||
import com.gh.gamecenter.qa.comment.CommentActivity
|
||||
import com.gh.gamecenter.video.game.GameVideoActivity
|
||||
import com.halo.assistant.HaloApp
|
||||
import com.lightgame.utils.Utils
|
||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||
@ -93,7 +94,7 @@ class DetailPlayerView @JvmOverloads constructor(context: Context, attrs: Attrib
|
||||
|
||||
gameNameTv.setOnClickListener { gameContainer.performClick() }
|
||||
gameContainer.setOnClickListener {
|
||||
DirectUtils.directToGameDetail(context, videoEntity.gameId, mEntrance)
|
||||
context.startActivity(GameVideoActivity.getIntent(context!!, videoEntity.gameId, mEntrance, ""))
|
||||
}
|
||||
|
||||
commentContainer.setOnClickListener {
|
||||
|
||||
@ -86,9 +86,10 @@ class GameVideoActivity : BaseActivity() {
|
||||
companion object {
|
||||
|
||||
@JvmStatic
|
||||
fun getIntent(context: Context, gameId: String): Intent {
|
||||
fun getIntent(context: Context, gameId: String, entrance: String, path: String): Intent {
|
||||
val intent = Intent(context, GameVideoActivity::class.java)
|
||||
intent.putExtra(EntranceUtils.KEY_GAMEID, gameId)
|
||||
intent.putExtra(EntranceUtils.KEY_ENTRANCE, mergeEntranceAndPath(entrance, path))
|
||||
return intent
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,14 +177,9 @@ class UploadVideoActivity : BaseActivity() {
|
||||
|
||||
override fun onMenuItemClick(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_text) {
|
||||
if (UploadManager.isUploading(mVideoFileEntity?.path
|
||||
?: "")) {
|
||||
DialogUtils.showUploadDraftDialog(this@UploadVideoActivity, null, {
|
||||
verifyData(true)
|
||||
})
|
||||
} else {
|
||||
DialogUtils.showUploadDraftDialog(this@UploadVideoActivity, null, {
|
||||
verifyData(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
return super.onMenuItemClick(item)
|
||||
}
|
||||
@ -205,8 +200,8 @@ class UploadVideoActivity : BaseActivity() {
|
||||
return
|
||||
}
|
||||
|
||||
val title = mBinding.gameTitle.text
|
||||
if (!isDraft && title.isNullOrEmpty()) {
|
||||
val title = mBinding.gameTitle.text.trim()
|
||||
if (!isDraft && title.isEmpty()) {
|
||||
toast("请填写标题")
|
||||
return
|
||||
}
|
||||
@ -363,7 +358,7 @@ class UploadVideoActivity : BaseActivity() {
|
||||
|
||||
override fun onUploadSuccess(uploadFilePath: String, url: String) {
|
||||
runOnUiThread {
|
||||
mBinding.uploadStatus.text = "上传完成"
|
||||
mBinding.uploadStatus.text = "视频已上传完成"
|
||||
mBinding.uploadSpeed.visibility = View.GONE
|
||||
mBinding.uploadButton.visibility = View.GONE
|
||||
mVideoFileEntity?.url = url
|
||||
@ -376,10 +371,12 @@ class UploadVideoActivity : BaseActivity() {
|
||||
mBinding.uploadStatus.text = "上传失败,视频文件不存在"
|
||||
mBinding.uploadStatus.setTextColor(R.color.text_EA3333.toColor())
|
||||
mBinding.uploadButton.setImageResource(R.drawable.upload_warning)
|
||||
toast("上传失败,视频文件不存在")
|
||||
} else {
|
||||
mBinding.uploadStatus.text = "网络错误,中断上传"
|
||||
mBinding.uploadStatus.setTextColor(R.color.text_FF700F.toColor())
|
||||
mBinding.uploadButton.setImageResource(R.drawable.upload_resume)
|
||||
toast("网络错误,请检查网络正常后再重试")
|
||||
}
|
||||
mBinding.uploadSpeed.visibility = View.GONE
|
||||
}
|
||||
|
||||
@ -53,14 +53,19 @@ class VideoManagerActivity : BaseActivity_TabLayout() {
|
||||
|
||||
override fun onMenuItemClick(item: MenuItem): Boolean {
|
||||
if (item.itemId == R.id.menu_text) {
|
||||
Matisse.from(this)
|
||||
.choose(MimeType.ofVideo())
|
||||
.countable(true)
|
||||
.maxSelectable(1)
|
||||
.addFilter(GhMatisseVideoFilter())
|
||||
.addApplyFilter(GhMatisseVideoApplyFilter())
|
||||
.showSingleMediaType(true)
|
||||
.forResult(REQUEST_CODE_SELECT_VIDEO)
|
||||
PermissionHelper.checkReadPhoneStateAndStoragePermissionBeforeAction(this,
|
||||
object : EmptyCallback {
|
||||
override fun onCallback() {
|
||||
Matisse.from(this@VideoManagerActivity)
|
||||
.choose(MimeType.ofVideo())
|
||||
.countable(true)
|
||||
.maxSelectable(1)
|
||||
.addFilter(GhMatisseVideoFilter())
|
||||
.addApplyFilter(GhMatisseVideoApplyFilter())
|
||||
.showSingleMediaType(true)
|
||||
.forResult(REQUEST_CODE_SELECT_VIDEO)
|
||||
}
|
||||
})
|
||||
}
|
||||
return super.onMenuItemClick(item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user