mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 03:35:58 +00:00
Fix crash with sticker availability change.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user