mirror of
https://github.com/afollestad/nock-nock.git
synced 2025-04-20 03:25:14 +00:00
Fix DiffUtil usage
This commit is contained in:
parent
b09088ab9e
commit
b7c51a12ed
2 changed files with 3 additions and 3 deletions
|
@ -31,10 +31,10 @@ class SiteDiffCallback(
|
|||
override fun areItemsTheSame(
|
||||
oldItemPosition: Int,
|
||||
newItemPosition: Int
|
||||
) = oldItems[oldItemPosition].id == oldItems[newItemPosition].id
|
||||
) = oldItems[oldItemPosition].id == newItems[newItemPosition].id
|
||||
|
||||
override fun areContentsTheSame(
|
||||
oldItemPosition: Int,
|
||||
newItemPosition: Int
|
||||
) = oldItems[oldItemPosition] == oldItems[newItemPosition]
|
||||
) = oldItems[oldItemPosition] == newItems[newItemPosition]
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ inline fun <reified T> EditText.attachLiveData(
|
|||
if (data.value != null) {
|
||||
this.setText(data.value.toString())
|
||||
} else {
|
||||
data.value = this.text.trim().toString().toInt() as T
|
||||
data.value = (this.text.trim().toString().toIntOrNull() ?: 0) as T
|
||||
}
|
||||
}
|
||||
// Out
|
||||
|
|
Loading…
Add table
Reference in a new issue