layout fix

CircularProgressIndicator was moved into the devices list.
This commit is contained in:
2023-09-28 21:55:35 +07:00
parent 415b5ef0d8
commit 0c949a9bda
3 changed files with 31 additions and 20 deletions
@@ -93,11 +93,7 @@ class MainActivity : ComponentActivity() {
permissionLauncher.launch(permissionsToRequest)
}
LaunchedEffect(key1 = bluetoothState.errorMessage) {
bluetoothState.errorMessage?.let { message ->
Toast.makeText(applicationContext, message, Toast.LENGTH_LONG).show()
}
}
LaunchedEffect(key1 = bluetoothState) {
if (bluetoothState.isConnected) {
Toast.makeText(applicationContext, "Подключение завершено", Toast.LENGTH_LONG)
@@ -106,6 +102,14 @@ class MainActivity : ComponentActivity() {
}
val navController = rememberNavController()
LaunchedEffect(key1 = bluetoothState.errorMessage) {
bluetoothState.errorMessage?.let { message ->
Toast.makeText(applicationContext, message, Toast.LENGTH_LONG).show()
navController.navigate("scanner")
}
}
TestblueTheme {
Surface(color = MaterialTheme.colorScheme.background) {
PermissionsRequest(