Simplified validation#4
Merged
codebymini merged 1 commit intoloop-remote-commands-apnsfrom Jul 19, 2025
Merged
Conversation
codebymini
approved these changes
Jul 19, 2025
codebymini
left a comment
There was a problem hiding this comment.
Very nice simplified code and clean up!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor Loop APNS Setup Validation to Use Computed Property
Summary
Simplified the Loop APNS setup validation logic by replacing the complex state management system with a clean computed property approach.
Changes
validateFullLoopAPNSSetup()method with a computed propertyloopAPNSSetupthat automatically derives its value from the required fieldsloopAPNSSetupfrom Storage as it was redundant with the computed stateonAppear,onDisappear, andonReceivethroughout the viewsBenefits
Technical Details
The
loopAPNSSetupproperty now automatically returnstruewhen all required fields (keyId, apnsKey, loopAPNSQrCodeURL, loopAPNSDeviceToken, loopAPNSBundleIdentifier) are non-empty. The UI reactively updates whenever any of these fields change.