Fix NullPointerException with optimization card

This commit is contained in:
sim 2023-06-12 23:26:23 +02:00
parent 1670b364d8
commit aeb39b4c65
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ class MainActivity : AppCompatActivity() {
startActivity(Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)) startActivity(Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS))
} }
} else { } else {
findViewById<MaterialCardView>(R.id.card_battery_optimization).isGone = true findViewById<MaterialCardView>(R.id.card_battery_optimization)?.isGone = true
} }
} }
private fun restart() { private fun restart() {