mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +03:00
fix LiveData value assignment nullability mismatch
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f10b76d430
commit
9afe4e44d6
2 changed files with 5 additions and 3 deletions
|
@ -92,7 +92,9 @@ class PollResultsFragment : Fragment(), PollResultItemClickListener {
|
|||
|
||||
viewModel.items.observe(viewLifecycleOwner) {
|
||||
val adapter = PollResultsAdapter(user, this).apply {
|
||||
list = it
|
||||
if (it != null) {
|
||||
list = it
|
||||
}
|
||||
}
|
||||
binding.pollResultsList.adapter = adapter
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ class PollResultsViewModel @Inject constructor() : ViewModel() {
|
|||
|
||||
private var _unfilteredItems: ArrayList<PollResultItem> = ArrayList()
|
||||
|
||||
private var _items: MutableLiveData<ArrayList<PollResultItem>> = MutableLiveData<ArrayList<PollResultItem>>()
|
||||
val items: LiveData<ArrayList<PollResultItem>>
|
||||
private var _items: MutableLiveData<ArrayList<PollResultItem>?> = MutableLiveData<ArrayList<PollResultItem>?>()
|
||||
val items: MutableLiveData<ArrayList<PollResultItem>?>
|
||||
get() = _items
|
||||
|
||||
private var disposable: Disposable? = null
|
||||
|
|
Loading…
Reference in a new issue