app: don't use non-null assertion for supportActionBar

This commit is contained in:
Harsh Shandilya 2021-11-01 10:15:33 +05:30
parent eb1ed0bbd1
commit 822b4db83f
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -216,7 +216,7 @@ class PasswordStore : BaseGitActivity() {
model.currentDir.observe(this) { dir ->
val basePath = PasswordRepository.getRepositoryDirectory().absoluteFile
supportActionBar!!.apply {
supportActionBar?.apply {
if (dir != basePath) title = dir.name else setTitle(R.string.app_name)
}
}
@ -611,7 +611,7 @@ class PasswordStore : BaseGitActivity() {
model.forceRefresh()
} else {
model.reset()
supportActionBar!!.setDisplayHomeAsUpEnabled(false)
supportActionBar?.setDisplayHomeAsUpEnabled(false)
}
}