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

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

issue_5413_2: create getListOSS() in ApplicationListViewModel

parent c161ecec
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -97,6 +97,21 @@ class ApplicationListViewModel @Inject constructor(
        }
    }

    /*
     * Get apps list from cleanapk only.
     * Issue: https://gitlab.e.foundation/e/backlog/-/issues/5413 [2]
     */
    fun getListOSS(category: String, source: String) {
        viewModelScope.launch(Dispatchers.IO) {
            appListLiveData.postValue(
                fusedAPIRepository.getAppsListOSS(
                    category,
                    source,
                )
            )
        }
    }

    /**
     * Add a placeholder app at the end if more data can be loaded.
     * "Placeholder" app shows a simple progress bar in the RecyclerView, indicating that