Fix new Toolbar

This commit is contained in:
Sylwester Zieliński
2022-05-11 14:43:57 +02:00
parent f0257c2d3f
commit edcc5bf6bc
18 changed files with 38 additions and 32 deletions

View File

@@ -1,6 +1,5 @@
package no.nordicsemi.android.uart.repository
import android.bluetooth.BluetoothDevice
import android.content.Context
import dagger.hilt.android.qualifiers.ApplicationContext
import kotlinx.coroutines.CoroutineScope

View File

@@ -51,7 +51,7 @@ fun UARTScreen() {
@Composable
private fun AppBar(state: UARTViewState, navigateUp: () -> Unit, onEvent: (UARTViewEvent) -> Unit) {
val toolbarName = (state.uartManagerState as? WorkingState)?.let {
(it.result as? SuccessResult<UARTData>)?.deviceName()
(it.result as? DeviceHolder)?.deviceName()
}
if (toolbarName == null) {