Refactor: Migrate network layer from Retrofit to Ktor
This commit migrates the network layer from Retrofit to Ktor. Specific changes include: - Replaced Retrofit with Ktor for network requests. - Updated dependencies to include Ktor libraries. - Refactored network service and data classes to use Ktor's API. - Removed Retrofit-specific code and dependencies. - Adjusted network module to provide Ktor client and services. - Updated Pixabay ImageRepository to use the new Ktor-based PixabayService. - Introduced Result sealed class to handle network responses. - Updated PhotoDetailViewModel to handle Result.Error state.
This commit is contained in:
@ -17,7 +17,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.paging.LoadState
|
||||
|
@ -1,7 +1,5 @@
|
||||
package dev.adriankuta.pixabay.feature.search
|
||||
|
||||
import dev.adriankuta.pixabay.data.model.PixabayImage
|
||||
|
||||
|
||||
data class SearchUiState(
|
||||
val query: String = ""
|
||||
|
Reference in New Issue
Block a user