mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 06:13:56 +00:00
fix: follow activity crash
This commit is contained in:
@@ -36,20 +36,22 @@ class FollowActivity : AppCompatActivity(){
|
||||
private lateinit var selected: ImageButton
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
val immersiveMode = PrefManager.getVal<Boolean>(PrefName.ImmersiveMode)
|
||||
if (immersiveMode) {
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
}
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
initActivity(this)
|
||||
binding = ActivityFollowBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
if (!PrefManager.getVal<Boolean>(PrefName.ImmersiveMode)) {
|
||||
if (!immersiveMode) {
|
||||
this.window.statusBarColor =
|
||||
ContextCompat.getColor(this, R.color.nav_bg_inv)
|
||||
binding.root.fitsSystemWindows = true
|
||||
|
||||
} else {
|
||||
binding.root.fitsSystemWindows = false
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE)
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN,
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||
@@ -58,6 +60,8 @@ class FollowActivity : AppCompatActivity(){
|
||||
topMargin = statusBarHeight
|
||||
}
|
||||
}
|
||||
|
||||
setContentView(binding.root)
|
||||
val layoutType = PrefManager.getVal<Int>(PrefName.FollowerLayout)
|
||||
selected = getSelected(layoutType)
|
||||
binding.followerGrid.alpha = 0.33f
|
||||
|
||||
Reference in New Issue
Block a user