package com.gh.gamecenter.forum.list

import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.R
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.common.utils.updateStatusBarColor

class ForumListActivity : ToolBarActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        updateStatusBarColor(R.color.background_white, R.color.background_white)
    }

    override fun isAutoResetViewBackgroundEnabled(): Boolean = true

    override fun onDarkModeChanged() {
        super.onDarkModeChanged()
        updateStatusBarColor(R.color.background_white, R.color.background_white)
    }

    override fun updateStaticViewBackground(view: View?) {
        updateStaticView(view, listOf(R.id.followTv))
    }

    companion object {
        const val TYPE_FOLLOW = "follow"
        const val TYPE_HOT = "hot"
        const val TYPE_OFFICIAL = "official"

        fun getIntent(context: Context, type: String): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_TYPE, type)
            return getTargetIntent(context, ForumListActivity::class.java, ForumListFragment::class.java, bundle)
        }
    }
}