mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: implement repository pattern replacement for AIDL methods
This commit is contained in:
parent
f73d909cd0
commit
80f8f2a591
4 changed files with 45 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ import com.geeksville.mesh.deviceProfile
|
|||
import com.geeksville.mesh.model.NodeDB
|
||||
import com.geeksville.mesh.model.getChannelUrl
|
||||
import com.geeksville.mesh.service.MeshService.ConnectionState
|
||||
import com.geeksville.mesh.service.ServiceAction
|
||||
import com.geeksville.mesh.service.ServiceRepository
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
|
@ -177,6 +178,12 @@ class RadioConfigRepository @Inject constructor(
|
|||
serviceRepository.emitMeshPacket(packet)
|
||||
}
|
||||
|
||||
val serviceAction: SharedFlow<ServiceAction> get() = serviceRepository.serviceAction
|
||||
|
||||
suspend fun onServiceAction(action: ServiceAction) = coroutineScope {
|
||||
serviceRepository.onServiceAction(action)
|
||||
}
|
||||
|
||||
val tracerouteResponse: StateFlow<String?> get() = serviceRepository.tracerouteResponse
|
||||
|
||||
fun setTracerouteResponse(value: String?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue