Fix crash with sticker availability change.
This commit is contained in:
parent
b081452bed
commit
007e8a9dca
1 changed files with 2 additions and 2 deletions
|
@ -36,13 +36,13 @@ class KeyboardPagerViewModel : ViewModel() {
|
|||
fun pages(): LiveData<Set<KeyboardPage>> = pages
|
||||
|
||||
fun setOnlyPage(page: KeyboardPage) {
|
||||
pages.value = setOf(page)
|
||||
pages.postValue(setOf(page))
|
||||
switchToPage(page)
|
||||
}
|
||||
|
||||
fun switchToPage(page: KeyboardPage) {
|
||||
if (this.pages.value.contains(page) && this.page.value != page) {
|
||||
this.page.value = page
|
||||
this.page.postValue(page)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue