Compare commits

...

16 Commits

Author SHA1 Message Date
2c23c4f0eb build: 修复特殊包的编译问题 2024-04-10 10:46:53 +08:00
2c2031f623 chore: 版本更新至 5.34.5 2024-04-08 15:42:29 +08:00
41ddf53e23 Merge branch 'feature-fix-comment-like' into 'release'
fix: 修复评论详情点赞异常的问题

See merge request halo/android/assistant-android!1612
2024-04-08 14:21:32 +08:00
b911edb83c fix: 修复评论详情点赞异常的问题 2024-04-08 14:16:00 +08:00
7524144c3d Merge branch 'chen/202404/fxi-refresh-icon-matrix' into 'release'
fix:修复图标矩阵点击换一批ui不刷新的问题

See merge request halo/android/assistant-android!1611
2024-04-08 11:11:46 +08:00
aef5bb0021 fix:修复图标矩阵点击换一批ui不刷新的问题 2024-04-08 11:09:39 +08:00
1e45790280 chore: 版本更新至 5.34.4 2024-04-07 15:11:54 +08:00
907f840537 Merge branch 'feature=fix-sentry-bug-2' into 'release'
feat: 修复Sentry上报的BUG

See merge request halo/android/assistant-android!1610
2024-04-07 10:56:04 +08:00
07dfd58538 feat: 修复Sentry上报的BUG 2024-04-07 10:56:04 +08:00
4491865aef Merge branch 'chen/202404/GHZS-5117' into 'release'
fix:【光环助手】视频横屏滑动专题的显示问题 https://jira.shanqu.cc/browse/GHZS-5117

See merge request halo/android/assistant-android!1609
2024-04-03 17:24:22 +08:00
9dabe9fa03 fix:【光环助手】视频横屏滑动专题的显示问题 https://jira.shanqu.cc/browse/GHZS-5117 2024-04-03 17:01:47 +08:00
79349d51ee Merge branch 'hotfix/v5.34.3-1033/custom_common_collection_layout' into 'release'
fix: 修复通用链接跳转通用合集详情样式不正确的问题

See merge request halo/android/assistant-android!1608
2024-04-03 10:19:58 +08:00
a3319b71d2 fix: 修复通用链接跳转通用合集详情样式不正确的问题 2024-04-02 22:42:14 +08:00
b06341959d chore: 版本更新至 5.34.3 2024-04-02 18:20:43 +08:00
089e552e0f Merge branch 'feat/GHZS-5114' into 'release'
feat: 神策SDK版本升级 https://jira.shanqu.cc/browse/GHZS-5114

See merge request halo/android/assistant-android!1607
2024-04-02 18:20:25 +08:00
16e0da0c7c feat: 神策SDK版本升级 https://jira.shanqu.cc/browse/GHZS-5114 2024-04-02 17:58:48 +08:00
12 changed files with 52 additions and 20 deletions

View File

@ -8,7 +8,7 @@ import com.gh.gamecenter.core.provider.IFlavorProvider
import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.halo.assistant.HaloApp
import com.leon.channel.helper.ChannelReaderUtil
import com.tencent.vasdolly.helper.ChannelReaderUtil
class FlavorProviderImp : IFlavorProvider {

View File

@ -12,7 +12,7 @@ import com.gh.gamecenter.core.utils.TimeUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.halo.assistant.HaloApp
import com.kwai.monitor.payload.TurboHelper
import com.leon.channel.helper.ChannelReaderUtil
import com.tencent.vasdolly.helper.ChannelReaderUtil
class FlavorProviderImp : IFlavorProvider {

View File

@ -29,7 +29,6 @@ import com.gh.gamecenter.home.custom.model.CustomPageItem.Companion.COMMON_CONTE
class CustomCommonCollectionDetailAdapter(
context: Context,
val layout: Int,
var collectionStyle: String,
val mViewModel: CustomCommonCollectionDetailViewModel,
val mLocation: String,
@ -51,8 +50,8 @@ class CustomCommonCollectionDetailAdapter(
return if (viewType == ItemViewType.ITEM_BODY) {
when (collectionStyle) {
"1-1" -> CommonCollectionDetailOneItemViewHolder(parent.toBinding())
"1-2" -> if (layout == COMMON_CONTENT_COLLECTION_LAYOUT_HORIZONTAL_SLIDE_BANNER ||
layout == COMMON_CONTENT_COLLECTION_LAYOUT_DOUBLE_ROW_BANNER
"1-2" -> if (mViewModel.getLayout() == COMMON_CONTENT_COLLECTION_LAYOUT_HORIZONTAL_SLIDE_BANNER
|| mViewModel.getLayout() == COMMON_CONTENT_COLLECTION_LAYOUT_DOUBLE_ROW_BANNER
) {
CommonCollectionDetailTwoItemHorizontalViewHolder(parent.toBinding())
} else {

View File

@ -60,7 +60,6 @@ class CustomCommonCollectionDetailFragment : LazyListFragment<LinkEntity, Custom
requireArguments().getParcelableArrayList<ExposureSource>(EntranceConsts.KEY_EXPOSURE_SOURCE_LIST)
mAdapter = CustomCommonCollectionDetailAdapter(
requireContext(),
mLayout,
mCollectionStyle,
mViewModel,
mLocation,
@ -74,7 +73,7 @@ class CustomCommonCollectionDetailFragment : LazyListFragment<LinkEntity, Custom
override fun provideListViewModel(): CustomCommonCollectionDetailViewModel {
val collectionId = arguments?.getString(EntranceConsts.KEY_COLLECTION_ID) ?: ""
mViewModel = viewModelProvider(CustomCommonCollectionDetailViewModel.Factory(collectionId))
mViewModel = viewModelProvider(CustomCommonCollectionDetailViewModel.Factory(collectionId, mLayout))
return mViewModel
}

View File

@ -13,16 +13,25 @@ import io.reactivex.Observable
class CustomCommonCollectionDetailViewModel(
application: Application,
private val mCollectionId: String
private val mCollectionId: String,
cachedLayout: Int,
) : ListViewModel<CommonCollectionContentEntity, CommonCollectionContentEntity>(application) {
var finalLayout = cachedLayout
val commonCollectionLiveData = MutableLiveData<CommonCollectionEntity>()
fun getLayout() : Int {
return finalLayout
}
override fun provideDataObservable(page: Int): Observable<MutableList<CommonCollectionContentEntity>>? {
return if (page == 1) {
RetrofitManager.getInstance().api
.getCommonCollectionDetail(mCollectionId)
.map {
if (it.layout != -1) {
finalLayout = it.layout
}
commonCollectionLiveData.postValue(it)
it.collectionList
}
@ -36,10 +45,10 @@ class CustomCommonCollectionDetailViewModel(
mResultLiveData.addSource(mListLiveData) { mResultLiveData.postValue(it) }
}
class Factory(private val collectionId: String) : ViewModelProvider.NewInstanceFactory() {
class Factory(private val collectionId: String, private val layout: Int) : ViewModelProvider.NewInstanceFactory() {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
return CustomCommonCollectionDetailViewModel(HaloApp.getInstance().application, collectionId) as T
return CustomCommonCollectionDetailViewModel(HaloApp.getInstance().application, collectionId, layout) as T
}
}
}

View File

@ -48,7 +48,10 @@ class CustomIconMatrixAdapter(
CustomChildIconMatrixViewHolder(parent.toBinding())
override fun onBindViewHolder(holder: CustomChildIconMatrixViewHolder, position: Int, payloads: MutableList<Any>) {
if (payloads.isNotEmpty()) {
val isRefreshDownloadStatus = payloads.any {
PAYLOAD_REFRESH_GAME_CHANGED == it
}
if (isRefreshDownloadStatus) {
DownloadItemUtils.updateItem(
context,
getItem(position),

View File

@ -4,6 +4,8 @@ import android.graphics.Rect
import android.os.Handler
import android.os.Looper
import android.view.View
import android.view.ViewGroup
import androidx.core.view.forEach
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.gh.gamecenter.common.constant.Constants
@ -88,6 +90,12 @@ class ScrollCalculatorHelper(val mListRv: RecyclerView, private val mPlayId: Int
if (child is RecyclerView && child.layoutManager is LinearLayoutManager) {
val hasChildVideoPlaying = playChildVideo(child)
if (hasChildVideoPlaying) break
} else if (child is ViewGroup) {
val childList = findRecyclerView(child)
if (childList != null) {
val hasChildVideoPlaying = playChildVideo(childList)
if (hasChildVideoPlaying) break
}
}
val player: View? = child?.findViewById(mPlayId)
@ -163,6 +171,20 @@ class ScrollCalculatorHelper(val mListRv: RecyclerView, private val mPlayId: Int
return false
}
/**
* 如果布局层次结构复杂,这里递归可能过深,为避免此情况,这里暂时只考虑一层的情况
*/
private fun findRecyclerView(container: ViewGroup): RecyclerView? {
val childCount = container.childCount
for (index in 0 until childCount) {
val child = container.getChildAt(index)
if (child is RecyclerView && child.layoutManager is LinearLayoutManager) {
return child
}
}
return null
}
private inner class PlayRunnable(var videoView: AutomaticVideoView?) : Runnable {
override fun run() {
if (videoView != null && !videoView!!.isInPlayingState) {

View File

@ -746,6 +746,8 @@ abstract class BaseCommentAdapter(
val loginEntrance = if (isVoted) "帖子评论-取消点赞" else "帖子评论-点赞"
binding.likeCountTv.context.ifLogin(loginEntrance) {
if (isVoted) {
viewModel.unLike(comment)
} else {
viewModel.like(comment)
if (viewModel is ArticleDetailViewModel) {
@ -758,8 +760,6 @@ abstract class BaseCommentAdapter(
comment.user.id ?: "", contentType, comment.id
?: "", bbsId, bbsType
)
} else {
viewModel.unLike(comment)
}
}
}

View File

@ -407,7 +407,7 @@ class SearchGameIndexAdapter(
(holder.getAdapterPosition() + 1).toString(),
"])"
),
location = "搜索-列表:" + gameEntity.name!!,
location = "搜索-列表:${gameEntity.name ?: ""}",
traceEvent = exposureEvent,
clickCallback = null,
refreshCallback = null

View File

@ -11,7 +11,7 @@ import com.gh.gamecenter.core.utils.SPUtils
import com.gh.gamecenter.core.utils.TimeUtils
import com.gh.gamecenter.core.utils.ToastUtils
import com.halo.assistant.HaloApp
import com.leon.channel.helper.ChannelReaderUtil
import com.tencent.vasdolly.helper.ChannelReaderUtil
class FlavorProviderImp : IFlavorProvider {

View File

@ -7,8 +7,8 @@ ext {
targetSdkVersion = 28
// application info (每个大版本之间的 versionCode 增加 20)
versionCode = 1032
versionName = "5.34.2"
versionCode = 1035
versionName = "5.34.5"
applicationId = "com.gh.gamecenter"
applicationIdGat = "com.gh.gamecenter.intl"
@ -132,7 +132,7 @@ ext {
composeCompilerVersion = "1.3.2"
constraintlayoutCompose = "1.0.1"
sensorsDataVersion = "6.6.8"
sensorsDataVersion = "6.7.10"
documentfile = "1.0.1"

View File

@ -5,10 +5,10 @@ import io.reactivex.SingleEmitter
class ACloudPushCommonCallback(private val emitter: SingleEmitter<String>) : CommonCallback {
override fun onSuccess(response: String) {
emitter.onSuccess(response)
if (!emitter.isDisposed) emitter.onSuccess(response)
}
override fun onFailed(errorCode: String, errorMessage: String) {
emitter.onError(ACloudPushException(errorCode, errorMessage))
if (!emitter.isDisposed) emitter.onError(ACloudPushException(errorCode, errorMessage))
}
}