mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-24 00:33:14 -04:00
a little less ugly
This commit is contained in:
@@ -24,8 +24,10 @@ import com.geeksville.mesh.model.NodeDB
|
||||
import com.geeksville.mesh.model.TextMessage
|
||||
import com.geeksville.mesh.model.UIState
|
||||
import com.geeksville.mesh.service.*
|
||||
import com.geeksville.mesh.ui.AppStatus
|
||||
import com.geeksville.mesh.ui.MeshApp
|
||||
import com.geeksville.mesh.ui.ScanState
|
||||
import com.geeksville.mesh.ui.Screen
|
||||
import com.geeksville.util.exceptionReporter
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignIn
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
|
||||
@@ -401,6 +403,10 @@ class MainActivity : AppCompatActivity(), Logging,
|
||||
super.onStart()
|
||||
|
||||
bindMeshService()
|
||||
|
||||
val bonded = RadioInterfaceService.getBondedDeviceAddress(this) != null
|
||||
if (!bonded)
|
||||
AppStatus.currentScreen = Screen.settings
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.ui.unit.dp
|
||||
import com.geeksville.android.Logging
|
||||
import com.geeksville.mesh.model.MessagesState
|
||||
import com.geeksville.mesh.model.UIState
|
||||
import com.geeksville.mesh.service.RadioInterfaceService
|
||||
|
||||
|
||||
object SettingsLog : Logging
|
||||
@@ -48,6 +49,26 @@ fun SettingsContent() {
|
||||
}
|
||||
|
||||
BTScanScreen()
|
||||
|
||||
val context = ambient(ContextAmbient)
|
||||
|
||||
val bonded = RadioInterfaceService.getBondedDeviceAddress(context) != null
|
||||
if (!bonded) {
|
||||
|
||||
val typography = MaterialTheme.typography()
|
||||
val context = ambient(ContextAmbient)
|
||||
|
||||
Text(
|
||||
text =
|
||||
"""
|
||||
You haven't yet paired a Meshtastic compatible radio with this phone.
|
||||
|
||||
This application is an early alpha release, if you find problems please post on our website chat.
|
||||
|
||||
For more information see our web page - www.meshtastic.org.
|
||||
""".trimIndent(), style = typography.body2
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user