Skip to content
Snippets Groups Projects
Commit 0feb395e authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Maybe fixed a bug on some devices

parent c2fe1f09
Branches
Tags
No related merge requests found
......@@ -104,12 +104,14 @@ class MainActivity : ServiceBoundActivity() {
}
state.observe(this, Observer {
val disconnected = it == ConnectionState.DISCONNECTED
val status = it ?: ConnectionState.DISCONNECTED
val disconnected = status == ConnectionState.DISCONNECTED
disconnect.isEnabled = !disconnected
connect.isEnabled = disconnected
snackbar?.dismiss()
snackbar = Snackbar.make(errorList, it!!.name, Snackbar.LENGTH_SHORT)
snackbar = Snackbar.make(errorList, status.name, Snackbar.LENGTH_SHORT)
snackbar?.show()
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment