feat: 【光环助手】搜索榜单的神策埋点问题 https://jira.shanqu.cc/browse/GHZSCY-6747
This commit is contained in:
@ -238,7 +238,7 @@ open class SearchActivity : BaseActivity() {
|
||||
GlobalActivityManager.getCurrentPageEntity().pageId,
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
key ?: "",
|
||||
TRACK_SEARCH_TYPE_DEFAULT,
|
||||
TRACK_SEARCH_TYPE_RANK,
|
||||
mSourceEntrance
|
||||
)
|
||||
}
|
||||
@ -433,12 +433,14 @@ open class SearchActivity : BaseActivity() {
|
||||
const val TRACK_SEARCH_TYPE_INPUT = "输入搜索"
|
||||
const val TRACK_SEARCH_TYPE_DEFAULT = "默认搜索"
|
||||
const val TRACK_SEARCH_TYPE_HISTORY = "历史搜索"
|
||||
const val TRACK_SEARCH_TYPE_RANK = "榜单搜索"
|
||||
|
||||
@JvmStatic
|
||||
fun toTrackSearchType(type: String) = when (type) {
|
||||
SearchType.AUTO.value -> TRACK_SEARCH_TYPE_AUTO
|
||||
SearchType.MANUAL.value -> TRACK_SEARCH_TYPE_INPUT
|
||||
SearchType.HISTORY.value -> TRACK_SEARCH_TYPE_HISTORY
|
||||
SearchType.RANK.value -> TRACK_SEARCH_TYPE_RANK
|
||||
else -> TRACK_SEARCH_TYPE_DEFAULT
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class SearchGameResultAdapter(
|
||||
private val dao: ISearchHistoryDao,
|
||||
val listViewModel: SearchGameResultViewModel,
|
||||
val entrance: String,
|
||||
val type: String,
|
||||
var type: String,
|
||||
val sourceEntrance: String
|
||||
) : ListAdapter<SearchItemData>(context), IExposable {
|
||||
|
||||
|
||||
@ -376,6 +376,7 @@ open class SearchGameResultFragment : ListFragment<GameEntity, SearchGameResultV
|
||||
this.mKey = key
|
||||
this.mType = type
|
||||
mAdapter?.key = key
|
||||
mAdapter?.type = type
|
||||
mAdapter?.clearAdIdSet()
|
||||
mListViewModel?.updateSearchKeyWithType(key, type)
|
||||
mListViewModel?.clearSearchSubjects()
|
||||
|
||||
@ -3,9 +3,9 @@ package com.gh.gamecenter.search.viewmodel
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.gh.gamecenter.SearchActivity
|
||||
import com.gh.gamecenter.common.base.GlobalActivityManager
|
||||
import com.gh.gamecenter.common.utils.SensorsBridge
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
|
||||
class SearchTabViewModel : ViewModel() {
|
||||
|
||||
@ -21,7 +21,8 @@ class SearchTabViewModel : ViewModel() {
|
||||
GlobalActivityManager.getCurrentPageEntity().pageName,
|
||||
location,
|
||||
searchKeyAndType.value?.first ?: "",
|
||||
searchKeyAndType.value?.second ?: "",
|
||||
searchKeyAndType.value?.let {
|
||||
SearchActivity.toTrackSearchType(it.second) } ?: "",
|
||||
text ?: "",
|
||||
position
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user