Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d303c333 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

filtering

parent e40fcf79
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -133,9 +133,12 @@ class UpdatesFragment : TimeoutFragment(R.layout.fragment_updates), ApplicationI

    private fun observeUpdateList(listAdapter: ApplicationListRVAdapter?) {
        updatesViewModel.updatesList.observe(viewLifecycleOwner) {
            listAdapter?.setData(it.first)

            val appsToDisplay = it.first.filter { it.isSystemApp } + it.first.filter { !it.isSystemApp }

            listAdapter?.setData(appsToDisplay)
            if (!isDownloadObserverAdded) {
                handleStateNoUpdates(it.first)
                handleStateNoUpdates(appsToDisplay)
                observeDownloadList()
                isDownloadObserverAdded = true
            }