sforkowany z mirror/meshtastic-android
WIP update to Jetpack compose dev05
rodzic
e1753cfa18
commit
332aa3b633
|
@ -45,7 +45,7 @@ android {
|
|||
|
||||
composeOptions {
|
||||
kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
|
||||
kotlinCompilerExtensionVersion "0.1.0-dev04"
|
||||
kotlinCompilerExtensionVersion "0.1.0-dev05"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ object ChannelLog : Logging
|
|||
@Composable
|
||||
fun ChannelContent(channel: Channel = Channel("Default", 7)) {
|
||||
val typography = MaterialTheme.typography()
|
||||
val context = ambient(ContextAmbient)
|
||||
val context = ContextAmbient.current
|
||||
|
||||
Column(modifier = LayoutSize.Fill + LayoutPadding(16.dp)) {
|
||||
Text(
|
||||
|
|
|
@ -50,16 +50,18 @@ fun HomeContent() {
|
|||
|
||||
if (false) { // hide the firmware update button for now, it is kinda ugly and users don't need it yet
|
||||
/// Create a software update button
|
||||
val context = ambient(ContextAmbient)
|
||||
val context = ContextAmbient.current
|
||||
RadioInterfaceService.getBondedDeviceAddress(context)?.let { macAddress ->
|
||||
Button(text = "Update firmware",
|
||||
Button(
|
||||
onClick = {
|
||||
SoftwareUpdateService.enqueueWork(
|
||||
context,
|
||||
SoftwareUpdateService.startUpdateIntent(macAddress)
|
||||
)
|
||||
}
|
||||
)
|
||||
) {
|
||||
Text(text = "Update firmware")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ object SettingsLog : Logging
|
|||
fun SettingsContent() {
|
||||
//val typography = MaterialTheme.typography()
|
||||
|
||||
val context = ambient(ContextAmbient)
|
||||
val context = ContextAmbient.current
|
||||
Column(modifier = LayoutSize.Fill + LayoutPadding(16.dp)) {
|
||||
|
||||
Row {
|
||||
|
@ -50,8 +50,6 @@ fun SettingsContent() {
|
|||
|
||||
BTScanScreen()
|
||||
|
||||
val context = ambient(ContextAmbient)
|
||||
|
||||
val bonded = RadioInterfaceService.getBondedDeviceAddress(context) != null
|
||||
if (!bonded) {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.61'
|
||||
ext.compose_version = '0.1.0-dev04'
|
||||
ext.compose_version = '0.1.0-dev05'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
|
Ładowanie…
Reference in New Issue