Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- var arrayList = GlobalApp().getInstance().daoSession?.contactDao?.queryBuilder()?.where(ContactDao.Properties.Phone.eq(it.phone), ContactDao.Properties.Phonelogin.eq(PhoneNumberUtils.convertPhone(GlobalApp().getInstance().profile?.phone)))?.list() as ArrayList<Contact>
- if(arrayList!=null && !arrayList.isEmpty()){
- arrayList.get(0).status = true
- arrayList.get(0).thumb = it.thumb
- arrayList.get(0).name = it.name
- arrayList.get(0).ismember = it.ismember
- arrayList.get(0).issub = it.issub
- GlobalApp().getInstance().daoSession?.contactDao?.updateInTx(arrayList.get(0))
- Debug.e("--- update thành công: ${it.phone} - isMember: ${it.ismember}")
- }
- } catch (e: Exception) {
- Debug.e("--- Lỗi update: ${it.phone}")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement