Skip to content

Commit

Permalink
Ensure app bar title isn't empty (openhab#3737)
Browse files Browse the repository at this point in the history
Signed-off-by: mueller-ma <[email protected]>
  • Loading branch information
mueller-ma authored Jul 16, 2024
1 parent 77d8b57 commit fcd993c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ class MainActivity : AbstractBaseActivity(), ConnectionFactory.UpdateListener {
fun updateTitle() {
val title = controller.currentTitle
val activeServerName = ServerConfiguration.load(prefs, getSecretPrefs(), prefs.getActiveServerId())?.name
setTitle(title ?: activeServerName ?: getString(R.string.app_name))
setTitle(title.orDefaultIfEmpty(activeServerName.orEmpty()).orDefaultIfEmpty(getString(R.string.app_name)))
drawerToggle.isDrawerIndicatorEnabled = !controller.canGoBack()
}

Expand Down

0 comments on commit fcd993c

Please sign in to comment.