NSC: improve profile sync
This commit is contained in:
parent
d2247dc9bc
commit
471ed28a04
2 changed files with 9 additions and 0 deletions
|
@ -199,6 +199,10 @@ import javax.inject.Inject
|
|||
.toObservable(EventOfflineChange::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ resend("EventOfflineChange") }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventProfileStoreChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ resend("EventProfileStoreChanged") }, fabricPrivacy::logException)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
|
|
@ -72,6 +72,7 @@ import info.nightscout.rx.events.EventNSClientNewLog
|
|||
import info.nightscout.rx.events.EventNewHistoryData
|
||||
import info.nightscout.rx.events.EventOfflineChange
|
||||
import info.nightscout.rx.events.EventPreferenceChange
|
||||
import info.nightscout.rx.events.EventProfileStoreChanged
|
||||
import info.nightscout.rx.events.EventProfileSwitchChanged
|
||||
import info.nightscout.rx.events.EventSWSyncStatus
|
||||
import info.nightscout.rx.events.EventTempTargetChange
|
||||
|
@ -250,6 +251,10 @@ class NSClientV3Plugin @Inject constructor(
|
|||
.toObservable(EventOfflineChange::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ executeUpload("EventOfflineChange", forceNew = false) }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventProfileStoreChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ executeUpload("EventProfileStoreChanged", forceNew = false) }, fabricPrivacy::logException)
|
||||
|
||||
runLoop = Runnable {
|
||||
var refreshInterval = T.mins(5).msecs()
|
||||
|
|
Loading…
Reference in a new issue