feat getAddress #refs 7622
This commit is contained in:
parent
962ba75bfa
commit
9c84f25c0c
|
@ -209,6 +209,19 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun getAddress() {
|
||||
salix.getAddressSalix("""{ "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
|
||||
.enqueue(object : SalixCallback<List<AddressLoses>>(context) {
|
||||
override fun onSuccess(response: Response<List<AddressLoses>>) {
|
||||
_addressLosesList.value = response.body()?.let { AddressLosesList(it) }
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
getAddressNew()
|
||||
}
|
||||
})
|
||||
}
|
||||
//Tarea 7622 retroCompatible, borrar getAddress y renombra getAddressNew a getAddress.
|
||||
fun getAddressNew() {
|
||||
salix.getAddressSalixNew("""{"where":{"type":"internal"}, "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
|
||||
.enqueue(object : SalixCallback<List<AddressLoses>>(context) {
|
||||
override fun onSuccess(response: Response<List<AddressLoses>>) {
|
||||
_addressLosesList.value = response.body()?.let { AddressLosesList(it) }
|
||||
|
|
Loading…
Reference in New Issue