mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-14 18:21:57 +00:00
Fix todo display when using skills. Fixes #1203
This commit is contained in:
parent
f269f41a4e
commit
1db19b1461
1 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,11 @@ class SkillTasksRecyclerViewFragment : BaseFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
compositeSubscription.add(taskRepository.getTasks(taskType ?: "", userId).firstElement().subscribe(Consumer { tasks -> adapter.updateData(tasks) }, RxErrorHandler.handleEmptyError()))
|
||||
var tasks = taskRepository.getTasks(taskType ?: "", userId)
|
||||
if (taskType == Task.TYPE_TODO) {
|
||||
tasks = tasks.map { it.where().equalTo("completed", false).findAll() }
|
||||
}
|
||||
compositeSubscription.add(tasks.firstElement().subscribe(Consumer { adapter.updateData(it) }, RxErrorHandler.handleEmptyError()))
|
||||
recyclerView?.adapter = adapter
|
||||
|
||||
val layoutManager = LinearLayoutManager(context)
|
||||
|
|
|
|||
Loading…
Reference in a new issue