mirror of
https://github.com/AdrianKuta/android-challange-adrian-kuta.git
synced 2025-07-03 10:57:58 +02:00
Refactor: Format code and update lint baselines
This commit applies code formatting changes across multiple files and updates lint baseline files. Key changes: - Added trailing commas to data classes in the `domain/types` module and related files. - Formatted `HomeScreenViewModel.kt`, `Result.kt`, `ObserveAirportsUseCase.kt`, `AirportService.kt`, `ObserveAirportsUseCaseModule.kt`, `AirportInfoDomainMapper.kt`, `AirportInfoModelMapper.kt`, `AirportsDatasourceModule.kt`, `AirportsDatasourceImpl.kt`, `FlightService.kt`, `Cache.kt`, and `CacheImpl.kt`. - Updated `README.md` and `LICENCE.md` with minor formatting adjustments. - Updated various `lint-baseline.xml` files due to changes in cached dependencies or formatting. - Added new `lint-baseline.xml` files for `model/datasource/airports`, `model/datasource/shared`, `domain/search`, and `model/data/api`. - Removed unused imports from `app/build.gradle.kts`. - Reformatted XML files: `ic_launcher_round.xml`, `ic_launcher.xml`, `strings.xml`, `ic_launcher_background.xml`. - Added project code style configuration files: `.idea/codeStyles/codeStyleConfig.xml` and `.idea/codeStyles/Project.xml`. - Reformatted `characters.json`. - Updated response data classes in `model/data/api/entities` with trailing commas and minor formatting.
This commit is contained in:
@ -15,11 +15,11 @@ import javax.inject.Inject
|
||||
|
||||
@HiltViewModel
|
||||
class HomeScreenViewModel @Inject constructor(
|
||||
private val observeAirportsUseCase: ObserveAirportsUseCase
|
||||
private val observeAirportsUseCase: ObserveAirportsUseCase,
|
||||
) : ViewModel() {
|
||||
|
||||
internal val uiState = homeUiState(
|
||||
useCase = observeAirportsUseCase
|
||||
useCase = observeAirportsUseCase,
|
||||
)
|
||||
.stateIn(
|
||||
scope = viewModelScope,
|
||||
@ -29,9 +29,8 @@ class HomeScreenViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
private fun homeUiState(
|
||||
useCase: ObserveAirportsUseCase
|
||||
useCase: ObserveAirportsUseCase,
|
||||
): Flow<HomeUiState> {
|
||||
|
||||
return useCase()
|
||||
.asResult()
|
||||
.map { result ->
|
||||
|
Reference in New Issue
Block a user