Android: hide Disconnect without remote
This commit is contained in:
@@ -154,7 +154,8 @@ fun SettingsSheet(viewModel: MainViewModel) {
|
|||||||
item { ListItem(headlineContent = { Text("Address") }, supportingContent = { Text(remoteAddress!!) }) }
|
item { ListItem(headlineContent = { Text("Address") }, supportingContent = { Text(remoteAddress!!) }) }
|
||||||
}
|
}
|
||||||
item {
|
item {
|
||||||
if (isConnected) {
|
// UI sanity: "Disconnect" only when we have an active remote.
|
||||||
|
if (isConnected && remoteAddress != null) {
|
||||||
Button(
|
Button(
|
||||||
onClick = {
|
onClick = {
|
||||||
viewModel.disconnect()
|
viewModel.disconnect()
|
||||||
|
|||||||
Reference in New Issue
Block a user