0
private lateinit var auth: FirebaseAuth
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
auth = Firebase.auth
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
supportActionBar?.hide()
val menuNavBottom: BottomNavigationView = findViewById(R.id.bottomNavigationView)
val navController = findNavController(R.id.FragmentContainerView)
menuNavBottom.setupWithNavController(navController)
}
public override fun onStart() {
super.onStart()
// Check if user is signed in (non-null) and update UI accordingly.
val currentUser = auth.currentUser
if (currentUser != null) {
reload();
}
}
}