Show disconnect option only when connected

This commit is contained in:
himalia416
2025-08-28 12:37:55 +02:00
committed by Himali Aryal
parent 882700e609
commit 125a022f01

View File

@@ -18,7 +18,7 @@ internal fun ProfileAppBar(
openLogger: () -> Unit
) {
if (deviceName?.isNotBlank() == true) {
if (connectionState !is ProfileUiState.Disconnected) {
if (connectionState is ProfileUiState.Connected) {
LoggerIconAppBar(deviceName, navigateUp, disconnect, openLogger)
} else {
LoggerBackIconAppBar(deviceName, navigateUp) { openLogger() }