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

EditCalendarActvivity: Switch to compose state and kotlin flows #320

Conversation

sunkup
Copy link
Member

@sunkup sunkup commented May 7, 2024

Purpose

As part of the switch to compose state and kotlin flows we also moved the code around as discussed in the guidelines for DAVx5. This PR applies these changes in the remaining EditCalendarActvivity.

Short description

  • Extract composables
  • handle view model creation in composables
  • introduce a new EditCalendarModel, which
    • does the dirty view-model check
    • validation
    • initializes other models (could maybe be rewritten to proper flow mapping and collection later on)
  • leave intent logic in the activity

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@sunkup sunkup linked an issue May 7, 2024 that may be closed by this pull request
2 tasks
@sunkup sunkup changed the title Move composable and create previews EditCalendarActvivity: Switch to compose state and kotlin flows May 7, 2024
@sunkup sunkup added the refactoring Quality improvement of existing functions label May 8, 2024
@sunkup sunkup marked this pull request as ready for review May 8, 2024 13:18
@sunkup sunkup requested a review from ArnyminerZ May 8, 2024 13:18
Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

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

Some comments

@sunkup sunkup requested a review from ArnyminerZ May 8, 2024 14:08
Copy link
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

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

Looks and works fine to me 😄

@ArnyminerZ ArnyminerZ merged commit 5a29ec8 into dev May 14, 2024
7 checks passed
@ArnyminerZ ArnyminerZ deleted the 319-editcalendaractvivity-switch-to-compose-state-and-kotlin-flows branch May 14, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Quality improvement of existing functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EditCalendarActvivity: Switch to compose state and kotlin flows
3 participants