Migrate EditSubscriptionActivity to Nav3#662
Conversation
sunkup
left a comment
There was a problem hiding this comment.
Code looks good, but for some reason going back from the EditSubscriptionScreen now always closes the app instead of actually going back (checkmark, back arrow and back gesture) to the subscriptions overview.
Strange, it is working fine for me 🤔 Screen_recording_20250826_154321.webm |
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
|
Yup, back gesture and back arrow work now, but the checkmark still closes ICSx5 down. |
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
|
Fixed, for some reason showing the toast message from the composable was being called twice. Now it's called from the viewmodel. |
sunkup
left a comment
There was a problem hiding this comment.
Nice. Now it works 👍
There is a print statement that should be removed though and then I think it's done.
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/at/bitfire/icsdroid/model/EditSubscriptionModel.kt # app/src/main/java/at/bitfire/icsdroid/ui/nav/MainApp.kt
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the EditSubscriptionActivity to the Nav3 navigation system by replacing the legacy activity-based navigation with composable-based navigation.
- Removes the
EditSubscriptionActivityclass and integrates its functionality into the Nav3 navigation system - Updates the navigation flow to use composable destinations instead of activity intents
- Refactors the success message handling from state-based to direct Toast display
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| EditSubscriptionActivity.kt | Completely removed the activity class |
| SubscriptionsScreen.kt | Updated to accept navigation callback instead of launching activity |
| EditSubscriptionScreen.kt | Refactored to handle navigation exit and removed success message state |
| MainApp.kt | Added new navigation entry for EditSubscription destination |
| Destination.kt | Added EditSubscription destination data class |
| EditSubscriptionModel.kt | Changed success message handling from state to direct Toast display |
| AndroidManifest.xml | Removed EditSubscriptionActivity registration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sunkup
left a comment
There was a problem hiding this comment.
Looks good!
How about we also update the section comments in the strings file:
CalendarListActivitytoSubscriptionScreenAddCalendarActivitytoAddSubscriptionScreen- etc
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
sunkup
left a comment
There was a problem hiding this comment.
There is still <!-- settings, currently in CalendarListActivity -->
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Purpose
Migrates the
EditSubscriptionActivityto Nav3.Short description
EditSubscriptionActivity.Checklist