Feni brian branch 01#1
Open
feni-brian wants to merge 3 commits into
Open
Conversation
- Reformatted the code with reindentation and removal of empty or unnecessary whitespaces; this was for easy reading. - Removed initialisation of immutable value 'metadata' since it wasn't being used and replaced it with an assignment to '_'. Could remove it as well if you wish.
Reformatted the code with reindentation and removal of empty or unnecessary whitespaces; this was for easy reading. Safely unwrapped the user's profile image url from the authViewModal because explicitly unwrapping the optional causes previews to crash since there isn't any profile image url present or in app storage. The AsyncImage switch covers known cases, but 'AsyncImagePhase' may have additional unknown values, possibly added in future versions. To handle unknown values, it's best to use the "@unknown default” case. Unfortunately, 'ContentUnavailableView' is only available in iOS 17.0 or newer; however, it serve well here I think. The environment object modifier in the preview provider allows the previews to automatically gain access to that environment object. Without it, it simply crashes.
- Removed the two declared state variables. They were rendered unnecessary. - Removed the button instances as well. No need for them as well. - Removed the two older versions of the navigation links and replaced them with the latest versions of navigation links. - Reformatted the code with indentation and removal of extra whitespaces and paragraphs.
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.
Made multiple changes to a few files thus far :
asyncImagePhaseprofileImageUrlvalue instead of explicitly unwrapping it.@unknown defaultin theAsyncImageview case.AuthViewModeldeclared in it.