-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Networking: Add UseCase Success/Failure for network calls #2
Conversation
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/WeatherUseCase.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/WeatherUseCase.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/WeatherUseCase.kt
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/HttpStatusCodeState.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/ktor/Response.kt
Outdated
Show resolved
Hide resolved
|
I'm not sure how I feel about the |
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/ApiCallResultState.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/metaweather/States.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/ktor/MetaWeatherApiImpl.kt
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/metaweather/view/ViewSideEffects.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/ktor/MetaWeatherApi.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/design/DimensionPresets.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/landingpage/view/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/landingpage/view/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/landingpage/view/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/landingpage/view/screens/WeatherReportView.kt
Outdated
Show resolved
Hide resolved
shared/src/commonMain/kotlin/co/touchlab/kampkit/metaweather/repo/WeatherUseCase.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
app/src/main/java/co/touchlab/kampkit/android/design/DimensionPresets.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/design/DimensionPresets.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/design/DimensionPresets.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/co/touchlab/kampkit/android/design/DimensionPresets.kt
Outdated
Show resolved
Hide resolved
May you please move all colors into a |
May we please revert iOS changes, and have that be a part of another PR. Thanks! |
Sure, let me know if there are more iOS changes required. |
.padding(start = Spacing.Horizontal.m) | ||
.fillMaxWidth() | ||
) | ||
Divider(modifier = Modifier.padding(8.dp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifier.padding(Spacing.Surrounding.m)
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be reverted.
</objects> | ||
<point key="canvasLocation" x="137.68115942028987" y="79.6875"/> | ||
</scene> | ||
</scenes> | ||
<resources> | ||
<image name="heart" catalog="system" width="128" height="109"/> | ||
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
Summary
Networking: Add UseCase Success/Failure for network calls
Fix
Used Sealed classes with Generic types for Success and Failure case
Success case
Failure case