-
Notifications
You must be signed in to change notification settings - Fork 9
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
ABW-1278 Edit persona #449
Conversation
guard let sharedFieldIDs = simple.sharedFieldIDs else { return nil } | ||
let presentFields = sharedFieldIDs.compactMap { fieldID in | ||
persona.fields.first { $0.id == fieldID } | ||
} |
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 changes the behaviour, on purpose: we no longer throw an error when a field is missing, we just skip it.
@@ -117,7 +117,7 @@ extension ProfileStore { | |||
} | |||
|
|||
/// A multicasting replaying async sequence of distinct Personas for the currently selected network. | |||
public func personaValues() async -> AnyAsyncSequence<Profile.Network.Personas> { |
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.
FYI it was unnecessarily marked async
for this reason: https://rdxworks.slack.com/archives/C03QFAWBRNX/p1680069940913459?thread_ts=1680027510.723299&cid=C03QFAWBRNX
happy to try without, but if we get weird compilation errors we will know what to revert.
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.
Aha. Either way it doesn't help, because the way it is wrapped we still introduce asynchronicity. Plus AnyAsyncSequence makes it throwing, which is also a shame. Makes the asynchronous for loops very ugly!
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.
Speaking of which, I'm not sure cancellation behaves as expected, and I'm not sure the if !Task.isCancelled
check works as intended.
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.
ok please have a look if you can fix the cancellation behaviour, it was my understanding that Task.isCancelled
always should tell us the state of the cancellation.
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.
yeah I actually though about adding reddavis/Asynchrone
(repo) because it has nicer type erasure then sideffect-io/AsyncExtension
, it has two variants:
AnyAsyncSequenceable
AnyThrowingAsyncSequenceable
where the first would not result in for try await
.
But I deemed it not worth having THREE differnt Async libs... And we might get AsyncSequence<Element>
into the language soon anyway!
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.
I recently asked about AsyncSequence<Element>
and the reply I got didn't sound super hopeful...
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.
Bravo, well done! looking forward to video demo in description, perhaps @nikola-milicevic or @GhenadieVP can help you out checking this branch out and test? OR did @umair-rdx ever setup local dev?
I'll give you a preemptive approve :)
a0a9684
to
7d3c56b
Compare
I suppose even without local dev, we could make an alpha for Umair? |
Yes go ahead if not done so already |
aadd073
to
1e58fae
Compare
Jira ticket: paste link here
Description
Adds persona editing to the persona list in settings as well as in Authorized Dapp details.
Notes
Also:
Refactors personas list and start using it in Authorized Dapps.
Start using push based updating of personas - letting the personaClient inform us of changes instead of relying on delegates.
Refactors PersonaDetails
RPReplay_Final1681994080.MP4
How to test
PR submission checklist