If we are unable to generate a barcode, just show nothing

This commit is contained in:
Kevin Hester 2021-04-05 15:52:26 +08:00
parent 479f242e06
commit 0c70ae860e
2 changed files with 23 additions and 15 deletions

View file

@ -98,7 +98,9 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
// doesn't cache radioconfig writes.
binding.editableCheckbox.isEnabled = connected
binding.qrView.setImageBitmap(channels.getChannelQR())
val bitmap = channels.qrCode
if (bitmap != null)
binding.qrView.setImageBitmap(bitmap)
val modemConfig = channel.modemConfig
val channelOption = ChannelOption.fromConfig(modemConfig)