ReposViewModel

class ReposViewModel @Inject constructor(client: AppHttpClient, dataService: AppDataService, storage: CrossStorage) : ViewModel

ViewModel for screen ReposScreen

Constructors

ReposViewModel
Link copied to clipboard
@Inject
fun ReposViewModel(client: AppHttpClient, dataService: AppDataService, storage: CrossStorage)

Functions

sortToggle
Link copied to clipboard
fun sortToggle()

Toggle type sort

Properties

_isSortASCListRepo
Link copied to clipboard
private val _isSortASCListRepo: MutableStateFlow<Boolean>

Is sort desc

client
Link copied to clipboard
private val client: AppHttpClient
dataService
Link copied to clipboard
private val dataService: AppDataService
isSortASCListRepo
Link copied to clipboard
val isSortASCListRepo: StateFlow<Boolean>

StateFlow is sort desc

listRepo
Link copied to clipboard
val listRepo: Flow<PagingData<RepoModel>>

Paging remote mediator RepoModel

storage
Link copied to clipboard
private val storage: CrossStorage