Accept null notes (from Careportal)
This commit is contained in:
parent
3d4d27439a
commit
68b8525935
|
@ -20,14 +20,14 @@ class UserEntryLogger @Inject constructor(
|
||||||
|
|
||||||
private val compositeDisposable = CompositeDisposable()
|
private val compositeDisposable = CompositeDisposable()
|
||||||
|
|
||||||
fun log(action: Action, s: String, vararg listvalues: ValueWithUnit) {
|
fun log(action: Action, s: String? ="", vararg listvalues: ValueWithUnit) {
|
||||||
val values = mutableListOf<ValueWithUnit>()
|
val values = mutableListOf<ValueWithUnit>()
|
||||||
for (v in listvalues){
|
for (v in listvalues){
|
||||||
if (v.condition) values.add(v)
|
if (v.condition) values.add(v)
|
||||||
}
|
}
|
||||||
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
||||||
action = action,
|
action = action,
|
||||||
s = s,
|
s = s ?:"",
|
||||||
values = values
|
values = values
|
||||||
))
|
))
|
||||||
.subscribeOn(aapsSchedulers.io)
|
.subscribeOn(aapsSchedulers.io)
|
||||||
|
@ -56,10 +56,10 @@ class UserEntryLogger @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun log(action: Action, s: String = "") {
|
fun log(action: Action, s: String? = "") {
|
||||||
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
||||||
action = action,
|
action = action,
|
||||||
s = s
|
s = s ?:""
|
||||||
))
|
))
|
||||||
.subscribeOn(aapsSchedulers.io)
|
.subscribeOn(aapsSchedulers.io)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
|
@ -69,10 +69,10 @@ class UserEntryLogger @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun log(action: Action, s: String = "", values: MutableList<ValueWithUnit>) {
|
fun log(action: Action, s: String? = "", values: MutableList<ValueWithUnit>) {
|
||||||
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
compositeDisposable += repository.runTransaction(UserEntryTransaction(
|
||||||
action = action,
|
action = action,
|
||||||
s = s,
|
s = s ?:"",
|
||||||
values = values
|
values = values
|
||||||
))
|
))
|
||||||
.subscribeOn(aapsSchedulers.io)
|
.subscribeOn(aapsSchedulers.io)
|
||||||
|
|
Loading…
Reference in a new issue