package com.gh.gamecenter.mypost

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

/**
 * 我的发布
 */
class MyPostActivity : ToolBarActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

    override fun isAutoResetViewBackgroundEnabled() = true

    override fun onDarkModeChanged() {
        super.onDarkModeChanged()
        updateStatusBarColor(com.gh.gamecenter.common.R.color.ui_surface, com.gh.gamecenter.common.R.color.ui_surface)
    }

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

    companion object {
        @JvmStatic
        fun getIntent(context: Context, entrance: String): Intent {
            val bundle = Bundle()
            bundle.putString(EntranceConsts.KEY_ENTRANCE, entrance)
            return getTargetIntent(context, MyPostActivity::class.java, MyPostWrapperFragment::class.java, bundle)
        }
    }

}