Skip to content

Add key storage toggle to Encryption settings#29310

Merged
dbkr merged 92 commits into
developfrom
dbkr/key_storage_toggle_2
Mar 14, 2025
Merged

Add key storage toggle to Encryption settings#29310
dbkr merged 92 commits into
developfrom
dbkr/key_storage_toggle_2

Conversation

@dbkr
Copy link
Copy Markdown
Member

@dbkr dbkr commented Feb 18, 2025

#29113 minus a couple of things that got split out

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

I'm wondering if we should use CryptoEvent.KeyBackupStatus. That said, maybe this is good enough and we should just correct the comments, and move on.

Comment on lines +195 to +196
// of megolm key backup has changed on the user's account (there's no event emitted for megolm
// key backup enabled state changing, so we use this instead).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there's no event emitted for megolm key backup enabled state changing

I don't think that's actually true: isn't CryptoEvent.KeyBackupStatus what you need?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, not sure why I didn't spot that before. Changed it to use that and all seems to be working nicely.

Comment thread src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx Outdated
Comment thread src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx Outdated
Comment thread src/DeviceListener.ts Outdated
Comment thread src/components/viewmodels/settings/encryption/KeyStoragePanelViewModel.ts Outdated
Comment thread src/components/viewmodels/settings/encryption/KeyStoragePanelViewModel.ts Outdated
dbkr and others added 2 commits March 12, 2025 16:14
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm otherwise!

Comment on lines 189 to 192
// Note that this could potentially update the UI while the user is trying to do something, although
// if their account data is changing then it implies that they're changing encryption related things
// on another device. This code is written with the assumption that it's better for the UI to refresh
// and be up to date with whatever changes they've made.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this still talks about account data, which I think is incorrect

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oops, good catch.

Which has gained nowrap due to 917d53a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants