mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix activity call outside MainActivity
This commit is contained in:
parent
706c7d120e
commit
86c9ca55dd
1 changed files with 3 additions and 2 deletions
|
|
@ -236,9 +236,10 @@ class BTScanModel @Inject constructor(
|
|||
devices.value = (testnodes.map { it.fullAddress to it }).toMap().toMutableMap()
|
||||
|
||||
// If nothing was selected, by default select the first thing we see
|
||||
if (selectedAddress == null)
|
||||
val activity = GeeksvilleApplication.currentActivity
|
||||
if (selectedAddress == null && activity is MainActivity)
|
||||
changeScanSelection(
|
||||
GeeksvilleApplication.currentActivity as MainActivity,
|
||||
activity,
|
||||
testnodes.first().fullAddress
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue