-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Konnectivity library to access and monitor network state changes #53
Conversation
Konnectivity is still a private repo. |
@remi Yeah I'll make it officially open source next week 😅 Edit : The repo is now public! 🎉 🚀 |
60f888a
to
15982a9
Compare
aed4bba
to
b02f6c1
Compare
15982a9
to
e27f5ac
Compare
b02f6c1
to
a5e2774
Compare
a5e2774
to
e0941f7
Compare
let content: @MainActor () -> Content | ||
|
||
var body: some View { | ||
content() |
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.
I guess it'll be used eventually to initialize things such as kword?
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.
Exactly! In #57, I use it to provide a ViewModelFactory
to our Previews 🙂
@Composable
fun PreviewContext(content: @Composable (ViewModelFactory) -> Unit) {
val viewModelFactory = ViewModelFactory()
content(viewModelFactory)
}
📖 Description
Add Konnectivity library to monitor network state changes.
🗒️ Notes
Also add Androidx.starup library to properly initialize our dependencies in the proper order. It allows us to expose the current Android application context to our androidMain module so we can add more expect-actual implementations that require the app's context in the future. 🔮
🎉 Result