Skip to content

Commit

Permalink
fix: clear wl selection when reset filters
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmateos committed Jan 8, 2024
1 parent d02f82f commit fc7ad01
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ fun WorkingListChipGroup(
FilterManager.getInstance().currentWorkingList(),
)
}
FilterManager.getInstance().observeWorkingListScope().addOnPropertyChangedCallback(
object : Observable.OnPropertyChangedCallback() {
override fun onPropertyChanged(sender: Observable?, propertyId: Int) {
selectedWorkingList = FilterManager.getInstance().currentWorkingList()
}
},
)

workingListFilterState.value?.let { workingListFilter ->
LazyRow(modifier) {
Expand All @@ -98,10 +105,9 @@ fun WorkingListChipGroup(
},
),
label = workingList.label,
selected = selectedWorkingList == workingList,
selected = selectedWorkingList?.uid == workingList.uid,
onSelected = { _ ->
workingListFilter.onChecked(workingList.id())
selectedWorkingList = FilterManager.getInstance().currentWorkingList()
},
)
}
Expand Down

0 comments on commit fc7ad01

Please sign in to comment.