mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
fix LiveData value assignment nullability mismatch
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f10b76d430
commit
9afe4e44d6
@ -92,7 +92,9 @@ class PollResultsFragment : Fragment(), PollResultItemClickListener {
|
|||||||
|
|
||||||
viewModel.items.observe(viewLifecycleOwner) {
|
viewModel.items.observe(viewLifecycleOwner) {
|
||||||
val adapter = PollResultsAdapter(user, this).apply {
|
val adapter = PollResultsAdapter(user, this).apply {
|
||||||
list = it
|
if (it != null) {
|
||||||
|
list = it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
binding.pollResultsList.adapter = adapter
|
binding.pollResultsList.adapter = adapter
|
||||||
}
|
}
|
||||||
|
@ -65,8 +65,8 @@ class PollResultsViewModel @Inject constructor() : ViewModel() {
|
|||||||
|
|
||||||
private var _unfilteredItems: ArrayList<PollResultItem> = ArrayList()
|
private var _unfilteredItems: ArrayList<PollResultItem> = ArrayList()
|
||||||
|
|
||||||
private var _items: MutableLiveData<ArrayList<PollResultItem>> = MutableLiveData<ArrayList<PollResultItem>>()
|
private var _items: MutableLiveData<ArrayList<PollResultItem>?> = MutableLiveData<ArrayList<PollResultItem>?>()
|
||||||
val items: LiveData<ArrayList<PollResultItem>>
|
val items: MutableLiveData<ArrayList<PollResultItem>?>
|
||||||
get() = _items
|
get() = _items
|
||||||
|
|
||||||
private var disposable: Disposable? = null
|
private var disposable: Disposable? = null
|
||||||
|
Loading…
Reference in New Issue
Block a user