Skip to content

Conversation

@burnoo
Copy link
Owner

@burnoo burnoo commented Dec 6, 2022

PR for CR, comments are welcome 🕵️

burnoo and others added 30 commits November 19, 2022 13:20
Implementing UsersNetworkDataSource using Ktor as http client. Json parsing is done
by Kotlinx serialization. Parsing tests were added in UsersApiTest.
This is necessary to not be warned about using @Incubating features.
UsersRepository is implemented by NetworkUsersRepository, which is using only one
DataSource - UsersNetworkDataSource. Test were added in NetworkUsersRepositoryTest.
UI State is represented by class UserListUiState.
Tests were implemented in UserListViewModelTest.
Added Koin modules for data:users:network, data:users:repository and ui:userlist.
In :app module DI was configured using cokoin and WithDependencyInjection
Composable function.
As this module includes :data:users:model via api() I think it's better to call it :core than :repository.
…dule

I plan to use FakeUsersRepository and TestUsers in :ui:userdetails - extracting to separate module
will help me reuse it there.
burnoo and others added 29 commits December 3, 2022 00:11
Next version - contains error handling, pagination and Compose Multiplatform
Update dependency com.alialbaali.kamel:kamel-image to v0.4.1
Update dependency gradle to v7.6
package dev.burnoo.demo.listapp.data.users.network.model

enum class NetworkError {
Client, Server, Device

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between client and device here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client -> 4xx
Device -> No Internet, etc.
I will think about better naming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device -> Network maybe? I'd expect IOException or `SocketTimeoutException or similar, don't know about others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants