Skip to content
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-1112] iCloud profile sync #468

Merged
merged 123 commits into from
May 17, 2023
Merged

[ABW-1112] iCloud profile sync #468

merged 123 commits into from
May 17, 2023

Conversation

CyonAlexRDX
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX commented May 2, 2023

Jira ticket -> https://radixdlt.atlassian.net/browse/ABW-1112

What was done

  • Update the Profile with the Header model, containing all of the metadata about the profile.
  • Along with being stored in Profile, the Header for each Profile is also stored in a separate HeaderList entity, to facilitate Profile cloud backup.
  • Implemented the necessary screens to allow users to restore from a backup.
  • Implemented the logic for Profile ownership, when a Profile shared across multiple devices can be owned only by one device.

Demo

https://drive.google.com/file/d/1Fv5-yIakMsQ40oqMaNoMoMaHWb4eZnea/view?usp=sharing

Copy link
Contributor

@kugel3 kugel3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Just some micro comments

@GhenadieVP
Copy link
Contributor

Will do an additional round of testing, after that will merge it.

@micbakos-rdx
Copy link
Contributor

@CyonAlexRDX , @GhenadieVP @kugel3 I am going to update the snapshot on Android too. I have a question related to the new header:

Are we going to keep the creationDate and lastModified dates along with the ones stored inside creatingDevice.date & lastUsedOnDevice.date?

@CyonAlexRDX
Copy link
Contributor Author

@CyonAlexRDX , @GhenadieVP @kugel3 I am going to update the snapshot on Android too. I have a question related to the new header:

Are we going to keep the creationDate and lastModified dates along with the ones stored inside creatingDevice.date & lastUsedOnDevice.date?

We can remove the stored property creationDate from header actually, and in code let
it be a computed property which reads out date from creatingDevice. creatingDevice itself is immutable in the struct, thus its date is immutable.

lastUsedOnDevice is mutable and set when a phone claims the profile, and that date is not the same as profiles lastModified date, which is the date when any change to profile occurred

@micbakos-rdx
Copy link
Contributor

@CyonAlexRDX , @GhenadieVP @kugel3 I am going to update the snapshot on Android too. I have a question related to the new header:
Are we going to keep the creationDate and lastModified dates along with the ones stored inside creatingDevice.date & lastUsedOnDevice.date?

We can remove the stored property creationDate from header actually, and in code let it be a computed property which reads out date from creatingDevice. creatingDevice itself is immutable in the struct, thus its date is immutable.

lastUsedOnDevice is mutable and set when a phone claims the profile, and that date is not the same as profiles lastModified date, which is the date when any change to profile occurred

Ok understood Alex thanks! So lastUsedOnDevice.date is the instant when the device claimed the profile and lastModified is when the user modifies the profile.

@GhenadieVP GhenadieVP merged commit 6f2263c into main May 17, 2023
@GhenadieVP GhenadieVP deleted the abw-1112_icloud_profile_sync branch May 17, 2023 12:52
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants