Compare commits
20 Commits
dev
...
v5.42.4-11
| Author | SHA1 | Date | |
|---|---|---|---|
| b9e0585dc9 | |||
| 9f191832fd | |||
| d8ee461a0a | |||
| 99094896b1 | |||
| 23203b0c5d | |||
| 4e054aa834 | |||
| e36cc54083 | |||
| bc5935d4b4 | |||
| 8fc3bb720d | |||
| e8b68f889d | |||
| 649af64e62 | |||
| 46516fb9c0 | |||
| eecfdced32 | |||
| 74d9aaf664 | |||
| 28bbb128dd | |||
| 7640812518 | |||
| 0a30e82e17 | |||
| 559951ad82 | |||
| 4a4cba5445 | |||
| b6d6568ac9 |
@ -16,6 +16,7 @@ class DefaultExposureStateChangeListener : IExposureStateChangeListener {
|
||||
val exposureStatus = if (inExposure) "曝光中" else "结束曝光"
|
||||
|
||||
val isCPMExposureEvent = exposureEvent.payload.miniGameType == Constants.WECHAT_MINI_GAME_CPM
|
||||
val isDSPExposureEvent = exposureEvent.payload.miniGameType == Constants.DSP_GAME
|
||||
|
||||
Utils.log(
|
||||
RecyclerViewExposureHelper.TAG,
|
||||
@ -29,6 +30,12 @@ class DefaultExposureStateChangeListener : IExposureStateChangeListener {
|
||||
"上报 CPM 曝光 ${exposureEvent.payload.gameName} ${exposureEvent.id}"
|
||||
)
|
||||
ExposureManager.logCPM(exposureEvent)
|
||||
} else if (isDSPExposureEvent && inExposure) {
|
||||
Utils.log(
|
||||
RecyclerViewExposureHelper.TAG,
|
||||
"上报 DSP 曝光 ${exposureEvent.payload.gameName} ${exposureEvent.id}"
|
||||
)
|
||||
ExposureManager.logDSP(exposureEvent)
|
||||
}
|
||||
|
||||
if (!inExposure
|
||||
|
||||
@ -111,6 +111,12 @@ object ExposureManager {
|
||||
}
|
||||
}
|
||||
|
||||
fun logDSP(event: ExposureEvent) {
|
||||
AppExecutor.logExecutor.execute {
|
||||
DspReportHelper.report(event.payload.showUrl)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param forcedUpload Ignore all restrictions.
|
||||
*/
|
||||
|
||||
@ -73,7 +73,7 @@ object RegionSettingHelper {
|
||||
if (list is ArrayList) return list
|
||||
}
|
||||
|
||||
val listCopy: ArrayList<GameEntity> = if (list is ArrayList) list else ArrayList(list)
|
||||
val listCopy: ArrayList<GameEntity> = ArrayList(list)
|
||||
listCopy.removeAll { mFilterGameIdSet?.contains(it.id) ?: false }
|
||||
return listCopy
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.view.menu.ActionMenuItemView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.doOnNextLayout
|
||||
import androidx.core.view.isVisible
|
||||
@ -96,6 +97,7 @@ import io.reactivex.disposables.Disposable
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import retrofit2.HttpException
|
||||
import splitties.views.horizontalPadding
|
||||
import java.util.*
|
||||
|
||||
class GameDetailWrapperFragment : BaseLazyFragment(), IScrollable {
|
||||
@ -286,7 +288,7 @@ class GameDetailWrapperFragment : BaseLazyFragment(), IScrollable {
|
||||
initSkeleton()
|
||||
|
||||
binding.reuseNoneData.reuseNoneDataTv.text = "页面不见了"
|
||||
bodyBinding.tabIndicator.setIndicatorWidth(12)
|
||||
bodyBinding.tabIndicator.setIndicatorWidth(16)
|
||||
bodyBinding.viewPager.offscreenPageLimit = 4
|
||||
binding.expandSpecialDownloadIv.enlargeTouchArea()
|
||||
|
||||
@ -357,8 +359,14 @@ class GameDetailWrapperFragment : BaseLazyFragment(), IScrollable {
|
||||
}
|
||||
backBtn.setOnClickListener { requireActivity().finish() }
|
||||
moreMenuItem = actionMenuView.menu.findItem(R.id.menu_more)
|
||||
downloadMenuItem = actionMenuView.menu.findItem(R.id.menu_download)
|
||||
downloadMenuItem = actionMenuView.menu.findItem(R.id.menu_download)?.apply {
|
||||
actionView?.updateLayoutParams<LayoutParams> { width = 40F.dip2px() }
|
||||
}
|
||||
downloadMenuItem?.isVisible = Config.isShow()
|
||||
actionMenuView.findViewById<ActionMenuItemView>(R.id.menu_more)?.run {
|
||||
updateLayoutParams<LayoutParams> { width = 40F.dip2px() }
|
||||
horizontalPadding = 8F.dip2px()
|
||||
}
|
||||
}
|
||||
|
||||
downloadMenuIcon = downloadMenuItem?.actionView?.findViewById(R.id.menu_download_iv)
|
||||
@ -910,7 +918,7 @@ class GameDetailWrapperFragment : BaseLazyFragment(), IScrollable {
|
||||
tab.customView = tabItemBinding.root
|
||||
updateTabStyle(tab, i == bodyBinding.viewPager.currentItem)
|
||||
tab.view.clipChildren = false
|
||||
tab.view.setPadding(0, 0, 0, 0)
|
||||
tab.view.setPadding(0, 0, if (i == tabEntityList.size - 1) 8F.dip2px() else 0, 0)
|
||||
tab.view.setOnTouchListener { _, event ->
|
||||
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||
handleTabTouchEvent(tabEntity?.name ?: "")
|
||||
@ -937,7 +945,7 @@ class GameDetailWrapperFragment : BaseLazyFragment(), IScrollable {
|
||||
tab.customView?.findViewById<TextView>(R.id.tab_title)
|
||||
?.setTypeface(if (isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT)
|
||||
tab.customView?.findViewById<TextView>(R.id.tab_title)?.setTextColor(
|
||||
if (isChecked) com.gh.gamecenter.common.R.color.text_primary.toColor(requireContext()) else com.gh.gamecenter.common.R.color.text_tertiary.toColor(
|
||||
if (isChecked) com.gh.gamecenter.common.R.color.text_primary.toColor(requireContext()) else com.gh.gamecenter.common.R.color.text_secondary.toColor(
|
||||
requireContext()
|
||||
)
|
||||
)
|
||||
|
||||
@ -7,7 +7,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewGroup.MarginLayoutParams
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.view.children
|
||||
import androidx.core.view.forEach
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@ -117,7 +117,7 @@ class GameLibaoAdapter(
|
||||
|
||||
binding.horizontalScrollView.goneIf(libaoEntity.materials.isEmpty()) {
|
||||
if (binding.imagesContainer.tag == libaoEntity.id) {
|
||||
binding.imagesContainer.children.forEach { view ->
|
||||
binding.imagesContainer.forEach { view ->
|
||||
if (view is SimpleDraweeView) {
|
||||
view.hierarchy.roundingParams = RoundingParams().apply {
|
||||
setCornersRadius(4F.dip2px().toFloat())
|
||||
|
||||
@ -6,6 +6,7 @@ import androidx.recyclerview.widget.DiffUtil.ItemCallback
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.common.utils.debounceActionWithInterval
|
||||
import com.gh.gamecenter.common.utils.toBinding
|
||||
import com.gh.gamecenter.common.view.Chips
|
||||
import com.gh.gamecenter.databinding.ItemColumnCollectionCustomTabBinding
|
||||
@ -30,8 +31,10 @@ class CustomTabFollowAdapter(private val viewModel: ColumnCollectionTabViewModel
|
||||
endIcon.setImageResource(R.drawable.ic_basic_x_8_secondary)
|
||||
endIcon.imageTintList = null
|
||||
setOnClickListener {
|
||||
if (!isForbidden) {
|
||||
viewModel?.addMore(subjectData)
|
||||
debounceActionWithInterval(500) {
|
||||
if (!isForbidden) {
|
||||
viewModel?.addMore(subjectData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import androidx.recyclerview.widget.DiffUtil.ItemCallback
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder
|
||||
import com.gh.gamecenter.R
|
||||
import com.gh.gamecenter.common.utils.debounceActionWithInterval
|
||||
import com.gh.gamecenter.common.utils.toBinding
|
||||
import com.gh.gamecenter.common.view.Chips
|
||||
import com.gh.gamecenter.databinding.ItemColumnCollectionCustomTabBinding
|
||||
@ -26,7 +27,9 @@ class CustomTabMoreAdapter(private val viewModel: ColumnCollectionTabViewModel?)
|
||||
startIcon.setImageResource(R.drawable.ic_auxiliary_plus_secondary_8)
|
||||
startIcon.imageTintList = null
|
||||
setOnClickListener {
|
||||
viewModel?.addFollow(subjectData)
|
||||
debounceActionWithInterval(500) {
|
||||
viewModel?.addFollow(subjectData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_tertiary"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:textSize="@dimen/secondary_title_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@ -33,14 +33,15 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/backContainer"
|
||||
android:layout_width="48dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/backBtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
@ -73,8 +74,8 @@
|
||||
<com.gh.gamecenter.common.view.TabIndicatorView
|
||||
android:id="@+id/tabIndicator"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/default_tab_indicator_height"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:indicatorColor="@color/primary_theme"
|
||||
app:disableIndicatorScaling="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -97,6 +98,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:minWidth="44dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -14,10 +14,4 @@
|
||||
android:title="@string/menu_more"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:orderInCategory="-1"
|
||||
android:title=""
|
||||
app:actionLayout="@layout/layout_menu_inset"
|
||||
app:showAsAction="always" />
|
||||
|
||||
</menu>
|
||||
@ -15,9 +15,14 @@ import com.tencent.vasdolly.helper.ChannelReaderUtil
|
||||
|
||||
class FlavorProviderImp : IFlavorProvider {
|
||||
|
||||
private var isInit = false
|
||||
|
||||
private val pendingEvent = arrayListOf<String>()
|
||||
|
||||
override fun init(application: Application, activity: Activity, activateRatio: Int) {
|
||||
SMHelper.init(application, getChannelStr(application))
|
||||
|
||||
isInit = true
|
||||
if (HaloApp.getInstance().isBrandNewInstall) {
|
||||
logEvent("EVENT_ACTIVE")
|
||||
SPUtils.setLong("TIME_OF_BRAND_NEW_INSTALL", System.currentTimeMillis() / 1000)
|
||||
@ -31,6 +36,8 @@ class FlavorProviderImp : IFlavorProvider {
|
||||
SPUtils.setBoolean("SHOULD_SEND_RETENTION_EVENT", false)
|
||||
}
|
||||
}
|
||||
pendingEvent.forEach(SMHelper::onEvent)
|
||||
pendingEvent.clear()
|
||||
}
|
||||
|
||||
override fun getChannelStr(application: Application): String {
|
||||
@ -43,7 +50,11 @@ class FlavorProviderImp : IFlavorProvider {
|
||||
}
|
||||
|
||||
override fun logEvent(content: String) {
|
||||
SMHelper.onEvent(content)
|
||||
if (isInit) {
|
||||
SMHelper.onEvent(content)
|
||||
} else {
|
||||
pendingEvent.add(content)
|
||||
}
|
||||
}
|
||||
|
||||
override fun logCoreEvent() {
|
||||
|
||||
@ -7,8 +7,8 @@ ext {
|
||||
targetSdkVersion = 30 // 升级targetSdkVersion到 34 时需要根据官方文档补全前台服务的权限类型。比如 NDownloadService,KeepAliveService
|
||||
|
||||
// application info (每个大版本之间的 versionCode 增加 20)
|
||||
versionCode = 1190
|
||||
versionName = "5.42.0"
|
||||
versionCode = 1194
|
||||
versionName = "5.42.4"
|
||||
applicationId = "com.gh.gamecenter"
|
||||
applicationIdGat = "com.gh.gamecenter.intl"
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@ object AppExecutor {
|
||||
|
||||
val cachedScheduler by lazy { Schedulers.from(ioExecutor) }
|
||||
val computationScheduler by lazy { Schedulers.from(heavyWeightIoExecutor) }
|
||||
val logScheduler by lazy { Schedulers.from(logExecutor) }
|
||||
|
||||
class MainThreadExecutor : Executor {
|
||||
private val mainThreadHandler = Handler(Looper.getMainLooper())
|
||||
|
||||
@ -72,7 +72,7 @@ class RecyclerViewExposureHelper(
|
||||
init {
|
||||
val disposable = collectExposureSubject
|
||||
.throttleLatest(SAMPLE_RATE, TimeUnit.MILLISECONDS)
|
||||
.subscribeOn(AndroidSchedulers.mainThread())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
collectExposureData()
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user