mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-19 15:34:26 +01:00
Clear repositories correctly
This commit is contained in:
@@ -111,6 +111,7 @@ class CGMRepository @Inject constructor(
|
||||
}
|
||||
|
||||
fun release() {
|
||||
_data.value = CGMServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +106,7 @@ class CSCRepository @Inject constructor(
|
||||
}
|
||||
|
||||
fun release() {
|
||||
_data.value = CSCServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ class HRSRepository @Inject constructor(
|
||||
}
|
||||
|
||||
fun release() {
|
||||
_data.value = HRSServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ class HTSRepository @Inject constructor(
|
||||
|
||||
fun release() {
|
||||
logger = null
|
||||
_data.value = HTSServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ class RSCSRepository @Inject constructor(
|
||||
|
||||
fun release() {
|
||||
logger = null
|
||||
_data.value = RSCSServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ class UARTRepository @Inject internal constructor(
|
||||
}
|
||||
|
||||
fun release() {
|
||||
_data.value = UARTServiceData()
|
||||
_stopEvent.tryEmit(DisconnectAndStopEvent())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user