Merge branch 'dev-5.0.0' of git.ghzs.com:halo/android/assistant-android into dev-5.0.0
This commit is contained in:
@ -28,7 +28,6 @@ import com.gh.gamecenter.category.CategoryDirectoryActivity
|
||||
import com.gh.gamecenter.category2.CategoryV2Activity
|
||||
import com.gh.gamecenter.download.DownloadFragment.Companion.INDEX_UPDATE
|
||||
import com.gh.gamecenter.entity.*
|
||||
import com.gh.gamecenter.eventbus.EBReuse
|
||||
import com.gh.gamecenter.eventbus.EBSkip
|
||||
import com.gh.gamecenter.forum.detail.ForumDetailActivity
|
||||
import com.gh.gamecenter.fragment.MainWrapperFragment
|
||||
@ -43,7 +42,6 @@ import com.gh.gamecenter.mygame.PlayedGameActivity
|
||||
import com.gh.gamecenter.personalhome.UserHomeActivity
|
||||
import com.gh.gamecenter.personalhome.background.PersonalityBackgroundActivity
|
||||
import com.gh.gamecenter.personalhome.border.AvatarBorderActivity
|
||||
import com.gh.gamecenter.qa.CommunityFragment
|
||||
import com.gh.gamecenter.qa.answer.detail.AnswerDetailActivity
|
||||
import com.gh.gamecenter.qa.article.SimpleArticleListActivity
|
||||
import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity
|
||||
@ -61,7 +59,6 @@ import com.gh.gamecenter.suggest.SuggestType
|
||||
import com.gh.gamecenter.tag.TagsActivity
|
||||
import com.gh.gamecenter.user.UserViewModel
|
||||
import com.gh.gamecenter.video.data.VideoDataActivity
|
||||
import com.gh.gamecenter.video.detail.VideoDetailActivity
|
||||
import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel
|
||||
import com.gh.gamecenter.video.game.GameVideoActivity
|
||||
import com.gh.gamecenter.video.videomanager.VideoManagerActivity
|
||||
@ -754,37 +751,25 @@ object DirectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换到社区页面
|
||||
* 切换到社区页面(旧社区页面已经没有了,处理为跳转到论坛详情)
|
||||
*/
|
||||
@JvmStatic
|
||||
fun directToCommunity(context: Context, community: CommunityEntity?) {
|
||||
if (MainActivity::class.java.name != RunningUtils.getTopActivity(context)) {
|
||||
val intent = Intent(context, MainActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
context.startActivity(intent)
|
||||
}
|
||||
UserManager.getInstance().setCommunityData(community)
|
||||
|
||||
// 这里换个线程操作是为了做一点延时
|
||||
AppExecutor.ioExecutor.execute {
|
||||
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_BBS))
|
||||
EventBus.getDefault().post(EBReuse(CommunityFragment.EB_RETRY_PAGE))
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun directToCommunity(context: Context) {
|
||||
if (MainActivity::class.java.name != RunningUtils.getTopActivity(context)) {
|
||||
val intent = Intent(context, MainActivity::class.java)
|
||||
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
||||
// 这里换个线程操作是为了做一点延时
|
||||
AppExecutor.ioExecutor.execute {
|
||||
EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_BBS))
|
||||
EventBus.getDefault().post(EBReuse(CommunityFragment.EB_RETRY_PAGE))
|
||||
}
|
||||
// if (MainActivity::class.java.name != RunningUtils.getTopActivity(context)) {
|
||||
// val intent = Intent(context, MainActivity::class.java)
|
||||
// intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
// context.startActivity(intent)
|
||||
//
|
||||
// UserManager.getInstance().setCommunityData(community)
|
||||
//
|
||||
// // 这里换个线程操作是为了做一点延时
|
||||
// AppExecutor.ioExecutor.execute {
|
||||
// EventBus.getDefault().post(EBSkip(MainActivity.EB_SKIP_MAIN, MainWrapperFragment.INDEX_BBS))
|
||||
// EventBus.getDefault().post(EBReuse(CommunityFragment.EB_RETRY_PAGE))
|
||||
// }
|
||||
// } else {
|
||||
directForumDetail(context, community?.id)
|
||||
// }
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
||||
@ -172,7 +172,7 @@ class OkHttpCacheInterceptor implements Interceptor {
|
||||
*/
|
||||
private String appendUserMarkIfNeeded(String url) {
|
||||
if (TextUtils.isEmpty(url)
|
||||
// || TextUtils.isEmpty(HaloApp.getInstance().getServerUserMark())
|
||||
|| TextUtils.isEmpty(HaloApp.getInstance().getServerUserMark())
|
||||
|| url.contains("mark=")) {
|
||||
return url;
|
||||
}
|
||||
|
||||
@ -79,8 +79,9 @@ open class SearchDefaultFragment : BaseFragment<Any>() {
|
||||
hotSearch.exposureEvent = ExposureEvent.createEvent(
|
||||
hotSearch.toGameEntity().apply { sequence = index },
|
||||
listOf(ExposureSource("首页搜索"), ExposureSource("热门搜索")))
|
||||
hotSearch.name = hotSearch.name.removeSuffix(".")
|
||||
if (!hotSearch.name.endsWith(hotSearch.nameSuffix ?: "")) {
|
||||
hotSearch.name = hotSearch.name.removeSuffix(".") + (hotSearch.nameSuffix ?: "")
|
||||
hotSearch.name = hotSearch.name + (hotSearch.nameSuffix ?: "")
|
||||
}
|
||||
ExposureManager.log(hotSearch.exposureEvent!!)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user