kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
Merge branch 'osmdroid-phase2' of github.com:ScriptTactics/Meshtastic-Android into osmdroid-phase2
commit
e156bf1f6e
|
@ -23,7 +23,7 @@ interface PacketDao {
|
|||
fun getMessagesFrom(contact: String): Flow<List<Packet>>
|
||||
|
||||
@Query("Select * from packet where data = :data")
|
||||
fun findDataPacket(data: DataPacket): Packet
|
||||
fun findDataPacket(data: DataPacket): Packet?
|
||||
|
||||
@Query("Delete from packet where port_num = 1")
|
||||
fun deleteAllMessages()
|
||||
|
@ -45,6 +45,6 @@ interface PacketDao {
|
|||
@Transaction
|
||||
fun updateMessageStatus(data: DataPacket, m: MessageStatus) {
|
||||
val new = data.copy(status = m)
|
||||
update(findDataPacket(data).copy(data = new))
|
||||
findDataPacket(data)?.let { update(it.copy(data = new)) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue