# Patryk Kosieradzki

Zobacz jak tworzyć solidne i bezpieczne aplikacje na Androida i iOS. Od solidnej architektury po bezpieczeństwo aplikacji mobilnych.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Comparing Objects in Swift Using the Equatable Protocol

DevFeed: [Comparing Objects in Swift Using the Equatable Protocol](<https://devfeed.tech/articles/comparing-objects-in-swift-using-the-equatable-protocol-25519.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/comparing-objects-in-swift-using-the-equatable-protocol>)

Published: 2024-04-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>)

Tags: [automatically](<https://devfeed.tech/tags/automatically.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [custom](<https://devfeed.tech/tags/custom.md>), [enums](<https://devfeed.tech/tags/enums.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [external](<https://devfeed.tech/tags/external.md>), [implement](<https://devfeed.tech/tags/implement.md>), [ios](<https://devfeed.tech/tags/ios.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [swift](<https://devfeed.tech/tags/swift.md>)

### AI overview

Swift's Equatable enables same-type values to be compared with == and !=. Since Swift 4.1, the compiler can synthesize conformance when every stored member is Equatable; otherwise, a member's type must also conform. For types from external libraries, the excerpt suggests adding conformance through an extension. You can also implement custom comparison logic, such as comparing phone values only by manufacturer. Enums can use synthesized conformance when all associated values and properties are Equatable.

### Source excerpt

How to improve object comparison in Swift using the Equatable protocol? See it in concrete examples.

## How to Fix Keyboard Issues Introduced in the Latest Jetpack Compose (1.4.0)

DevFeed: [How to Fix Keyboard Issues Introduced in the Latest Jetpack Compose (1.4.0)](<https://devfeed.tech/articles/how-to-fix-keyboard-issues-introduced-in-the-latest-jetpack-compose-1-4-0-25521.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/how-to-fix-keyboard-issues-introduced-in-the-latest-jetpack-compose-1-4-0>)

Published: 2023-03-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [keyboard](<https://devfeed.tech/topics/keyboard.md>), [tech support](<https://devfeed.tech/topics/tech-support.md>)

Tags: [1-4](<https://devfeed.tech/tags/1-4.md>), [2023](<https://devfeed.tech/tags/2023.md>), [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [issue-tracker](<https://devfeed.tech/tags/issue-tracker.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [regression](<https://devfeed.tech/tags/regression.md>)

### AI overview

After upgrading to Jetpack Compose 1.4.0, a full-screen DialogFragment containing a ComposeView could give a TextField focus without showing the software keyboard; the author says this affected about 20% of their app. Testing across devices, input types, and inset handling did not change the behavior. The excerpt traces the regression to a change in Compose and notes that it had been reported while testing 1.4.0-alpha03 over three months before the stable release. It does not include the eventual fix or workaround.

### Source excerpt

Non-working keyboard in the latest version of Jetpack Compose - another case of keyboard issues in Compose.

## Dagger/Hilt vs. Koin for Jetpack Compose Apps

DevFeed: [Dagger/Hilt vs. Koin for Jetpack Compose Apps](<https://devfeed.tech/articles/dagger-hilt-vs-koin-for-jetpack-compose-apps-25520.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/dagger-hilt-vs-koin-dependency-injection-for-jetpack-compose-apps>)

Published: 2022-03-13T00:00:00Z

Content type: comparison

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [Dagger](<https://devfeed.tech/topics/dagger.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [dagger-hilt](<https://devfeed.tech/tags/dagger-hilt.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [koin](<https://devfeed.tech/tags/koin.md>)

### AI overview

A comparison of Dagger/Hilt and Koin for dependency injection in Jetpack Compose Android applications. It discusses code generation, build and runtime considerations, Google's recommendation of Hilt, and two Compose integration approaches: pure Compose with navigation-compose or Fragments with ComposeView.

### Source excerpt

A detailed comparison of using Hilt versus Koin for dependency injection in Jetpack Compose applications.

## Why Using Navigation-Compose in Your Jetpack Compose App is a Bad Idea

DevFeed: [Why Using Navigation-Compose in Your Jetpack Compose App is a Bad Idea](<https://devfeed.tech/articles/why-using-navigation-compose-in-your-jetpack-compose-app-is-a-bad-idea-25523.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/why-using-navigation-compose-in-your-jetpack-compose-app-is-a-bad-idea>)

Published: 2022-02-13T00:00:00Z

Content type: opinion

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [jetpack-navigation](<https://devfeed.tech/topics/jetpack-navigation.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [fragment](<https://devfeed.tech/tags/fragment.md>), [fragments](<https://devfeed.tech/tags/fragments.md>), [google](<https://devfeed.tech/tags/google.md>), [graph](<https://devfeed.tech/tags/graph.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [library](<https://devfeed.tech/tags/library.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [navigation-component](<https://devfeed.tech/tags/navigation-component.md>), [react](<https://devfeed.tech/tags/react.md>), [rendering](<https://devfeed.tech/tags/rendering.md>), [route](<https://devfeed.tech/tags/route.md>), [screen](<https://devfeed.tech/tags/screen.md>)

### AI overview

The author questions whether Navigation Compose is a good fit for Jetpack Compose apps, comparing it with using Fragments for navigation and Compose for rendering. They describe Navigation Compose as replacing Fragment destinations with NavBackStackEntry entries in a composable NavHost graph. In the excerpt, the main criticism is route paths: developers must maintain path structure, parameter order and values, or define screen constants, which the author says adds setup work. The excerpt begins contrasting this with Fragments and Safe Args, where XML declares arguments and generated code supplies typed arguments when navigating. It ends before explaining how those arguments are retrieved or giving the author's final recommendation.

### Source excerpt

Navigation Compose issues that will break your Android app and how to avoid them.

## Make sure to update your StateFlow safely in Kotlin!

DevFeed: [Make sure to update your StateFlow safely in Kotlin!](<https://devfeed.tech/articles/make-sure-to-update-your-stateflow-safely-in-kotlin-25522.md>)

Original publisher: [Read original article](<https://patrykkosieradzki.com/make-sure-to-update-your-stateflow-safely-in-kotlin>)

Published: 2021-07-25T00:00:00Z

Content type: article

Language: en

Sources: [Patryk Kosieradzki](<https://devfeed.tech/sources/patryk-kosieradzki.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [safely](<https://devfeed.tech/tags/safely.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [update](<https://devfeed.tech/tags/update.md>)

### AI overview

Updating a `MutableStateFlow` with `value.copy(...)` can lose concurrent changes: another thread may update a different property after the copy is made but before it is emitted. The excerpt recommends `update`, `updateAndGet`, and `getAndUpdate`, which take a function that derives the new state from the current value. It describes `update` as applying that function and using `compareAndSet`; if the value changed concurrently, it retries until the update succeeds. The excerpt does not explain differences among the three methods.

### Source excerpt

StateFlow is a common choice for storing app state in Android, e.g., view state. But do you know how to use it correctly?