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

Commit 417be7c5 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

issue_5413_2 [WIP]: Implement getCategoriesListOSS() in view model

parent 0968446f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -44,6 +44,12 @@ class CategoriesViewModel @Inject constructor(
        }
    }

    fun getCategoriesListOSS(type: Category.Type) {
        viewModelScope.launch {
            categoriesList.postValue(fusedAPIRepository.getCategoriesListOSS(type))
        }
    }

    fun isCategoriesEmpty(): Boolean {
        return categoriesList.value?.first?.isEmpty() ?: true
    }