Build phone number picker

This commit is contained in:
moezbhatti
2019-11-07 02:44:19 -05:00
committed by Moez Bhatti
parent 058d12d3bb
commit bb816209ba
21 changed files with 531 additions and 28 deletions
@@ -28,4 +28,8 @@ open class Contact(
var name: String = "",
var starred: Boolean = false,
var lastUpdate: Long = 0
) : RealmObject()
) : RealmObject() {
fun getDefaultNumber(): PhoneNumber? = numbers.find { number -> number.isDefault }
}
@@ -19,9 +19,12 @@
package com.moez.QKSMS.model
import io.realm.RealmObject
import io.realm.annotations.PrimaryKey
open class PhoneNumber(
@PrimaryKey var id: Long = 0,
var accountType: String = "",
var address: String = "",
var type: String = ""
) : RealmObject()
var type: String = "",
var isDefault: Boolean = false
) : RealmObject()