From 822b4db83fe76ae192f857e146c45d718508c902 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 1 Nov 2021 10:15:33 +0530 Subject: [PATCH] app: don't use non-null assertion for supportActionBar --- .../main/java/dev/msfjarvis/aps/ui/passwords/PasswordStore.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/passwords/PasswordStore.kt b/app/src/main/java/dev/msfjarvis/aps/ui/passwords/PasswordStore.kt index ba1e4ac6..74c46ef6 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/passwords/PasswordStore.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/passwords/PasswordStore.kt @@ -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) } }