Skip to content
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

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

marcantoinefortier
Copy link
Contributor

@marcantoinefortier marcantoinefortier commented Dec 1, 2023

📖 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

iOS Android
Screenshot 2023-12-01 at 17 45 17 Screenshot 2023-12-01 at 17 45 58

@marcantoinefortier marcantoinefortier changed the title Add konnectivity Add Konnectivity library to access and monitor network state changes Dec 1, 2023
@remi
Copy link
Member

remi commented Dec 2, 2023

Konnectivity is still a private repo.

@marcantoinefortier
Copy link
Contributor Author

marcantoinefortier commented Dec 2, 2023

@remi Yeah I'll make it officially open source next week 😅

Edit : The repo is now public! 🎉 🚀

@marcantoinefortier marcantoinefortier force-pushed the setup/platform-info branch 3 times, most recently from 60f888a to 15982a9 Compare December 6, 2023 22:31
Base automatically changed from setup/platform-info to main December 6, 2023 23:15
let content: @MainActor () -> Content

var body: some View {
content()
Copy link
Member

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?

Copy link
Contributor Author

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)
}

@marcantoinefortier marcantoinefortier merged commit 8baf0d7 into main Dec 8, 2023
1 check passed
@marcantoinefortier marcantoinefortier deleted the setup/konnectivity branch December 8, 2023 20:16
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.

4 participants