-
-
Notifications
You must be signed in to change notification settings - Fork 107
fix: Emit AccountsItemChanged when own key is generated/imported, use gray self-color until that (#7296) #7291
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
Conversation
as key import is mentioned in #7289 as a reason to no wait for key: importing own key is no longer supported. so we can probably wait until key is generated, that would not add additional compleyity and states apart from that, where is self-color acutually used for self? on avatar selection? there maybe show an icon similar to android/ios, nudging ppl to set an avatar |
It's difficult to understand what the issue is, better open an issue with the description of a bug first. There is some description in #7289, but that is also a PR. |
I still don't know what the issue is. On desktop when I create a new profile, in the profile selector on the left the color is grey, so no incorrect color is seen.
I also agree that whatever the problem is, UI developers should not need to care about the keys and know that SelfKeyAvailable means the color is changed. What matters for UI is whether the color is available or not, regardless of whether it depends on the key or address or anything else. |
Key import isn't supported explicitly in UIs, but it's still supported via sending an Autocrypt Setup Message, there are Rust and Python tests on that. Firstly i forgot about that and tried to fix the bug without using a temporary gray color. Anyway, i think the fix here isn't that complex and also we can use |
true |
1da8e0f
to
b414119
Compare
I've checked, with |
sending: yes. but which deltachat can import them? this should be regarded as a bug.
we really do not want to allow importing random keys via ASM or elsewhere - for security reasons, to make some concrete assumptions about security. avg user will never try that anyways, and we do no longer want to allow that. so, ASM and import-keys that is never used should not rule other decisions in general but yeah, this PR looks simple enough, and if it fixes an issue at hand, it seems fine |
Ok, entering the ASM code is dropped from UIs, but Core still supports that, so even if that should be dropped (but i don't think so -- for security audits we can say that this Core feature is out of scope), this should be done separately and for now the bug can't be fixed by generating own keypair during configuration because this breaks Rust and Python tests. |
… gray self-color until that (#7296) Emitting an `AccountsItemChanged` event is needed for UIs to know when `Contact::get_color()` starts returning the true color for `SELF`. Before, an address-based color was returned for a new account which was changing to a fingerprint-based color e.g. on app restart. Now the self-color is our favorite gray until own keypair is generated or imported e.g. via ASM.
b414119
to
4317354
Compare
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.
LGTM, but maybe wait for someone else to also approve
Decided to merge, the fix is simple enough |
See commit messages.
Replacement for #7289. Tested manually in Desktop.
Close #7296