Skip to content

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Apr 25, 2025

Replaced by Flow

@rfc2822 rfc2822 added the refactoring Internal improvement of existing functions label Apr 25, 2025
@rfc2822 rfc2822 self-assigned this Apr 25, 2025
@rfc2822 rfc2822 requested a review from Copilot April 25, 2025 07:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the usage of LiveData in favor of Kotlin Flow, simplifying reactive data updates and aligning with modern patterns. Key changes include:

  • Removal of the compose-runtime-livedata dependency from the Gradle libs.versions.toml.
  • Conversion of translations in AboutActivity from LiveData to a Flow and the corresponding change from observeAsState to collectAsStateWithLifecycle.
  • Removal of LiveData-based queries in WebDavDocumentDao.

Reviewed Changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

File Description
gradle/libs.versions.toml Removed the compose-runtime-livedata dependency.
app/src/main/kotlin/at/bitfire/davdroid/ui/AboutActivity.kt Replaced LiveData usage with Flow for translations and updated related imports accordingly.
app/src/main/kotlin/at/bitfire/davdroid/db/WebDavDocumentDao.kt Eliminated a LiveData-based query method to align with the new reactive approach.
Files not reviewed (3)
  • .idea/codeStyles/Project.xml: Language not supported
  • .idea/codeStyles/codeStyleConfig.xml: Language not supported
  • app/build.gradle.kts: Language not supported

@rfc2822 rfc2822 merged commit fe0c1e6 into main-ose Apr 25, 2025
7 checks passed
@rfc2822 rfc2822 deleted the drop-livedata branch April 25, 2025 07:59
@rfc2822 rfc2822 moved this from Todo to Done in DAVx⁵ Releases Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant