diff --git a/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt b/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt index 9495e86..bee88a1 100644 --- a/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt +++ b/app/src/main/kotlin/jackall/overlaymulticounter/activity/MainActivity.kt @@ -21,6 +21,7 @@ binding = DataBindingUtil.setContentView(this, R.layout.activity_main) mainViewModel = ViewModelProviders.of(this, MainViewModel.Factory()).get(MainViewModel::class.java) binding.mainViewModel = mainViewModel + lifecycle.addObserver(mainViewModel) if (CounterRealmHelper().getNextId() == 0) { CounterRealmHelper().insert(