if device goes away at just the right time, user won't be able to set channel

pull/95/head
geeksville 2020-07-08 08:29:53 -07:00
rodzic 931cfb52d3
commit 49752d0550
1 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -646,7 +646,16 @@ class MainActivity : AppCompatActivity(), Logging,
}
.setPositiveButton(R.string.accept) { _, _ ->
debug("Setting channel from URL")
try {
model.setChannel(channel.settings)
} catch (ex: RemoteException) {
errormsg("Couldn't change channel ${ex.message}")
Toast.makeText(
this,
"Couldn't change channel, because radio is not yet connected. Please try again.",
Toast.LENGTH_SHORT
).show()
}
}
.show()
}