-
Notifications
You must be signed in to change notification settings - Fork 14
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
ObservableObject to @Observable migrations #1458 #1672
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # CHANGELOG.md
@Dependency(\.analytics) private var analytics | ||
@Dependency(\.crashReporting) private var crashReporting | ||
@MainActor @Dependency(\.currentUser) private var currentUser | ||
@Published var numberOfConnectedRelays: Int = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property wasn't being used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me and works fine. I might still suggest having @mplorentz review since our release is coming up soon.
Issues covered
#1458
Description
Migrates several more classes to use
@Observable
macro rather than theObservableObject
protocol for the performance gains and general modernization of patterns.How to test
Navigate to the Note Composer view.
Tap "@" to bring up the user search view.
Observe that the search fires on key taps.
Navigate to the Note Composer.
Type a note.
Send it.
Observe that the note was sent.
Navigate to the Discover tab.
Search for something.
Observe that results appear as you type.
Navigate to your profile view.
Tap the Claim your username button.
Select either set up or already have.
Type in the box.
Observe that the UI responds as you type.
Screenshots/Video
No intended UI changes, but here are some videos of affected areas of code to show that they still work as expected:
Adding a mention to a note...(shows that the refactored
TextDebouncer
works)Posting a note...(shows that
RelayService
as@Observable
works)Search in Discover...(shows that
SearchController
as@Observable
works)Username search...(shows that
SearchController
andTextDebouncer
work)