diff --git a/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/CounterItemViewModel.kt b/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/CounterItemViewModel.kt index feea98c..53e6a49 100644 --- a/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/CounterItemViewModel.kt +++ b/app/src/main/kotlin/jackall/overlaymulticounter/viewmodel/CounterItemViewModel.kt @@ -15,8 +15,10 @@ val title = ObservableField(counter.title) val count = ObservableField(counter.count.toString()) val realmChangeListener = RealmChangeListener { - title.set(it.title) - count.set(it.count.toString()) + if (it.isValid) { + title.set(it.title) + count.set(it.count.toString()) + } } init {