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

Populate colorHash and colorId #2630

Merged
merged 2 commits into from
Apr 8, 2022
Merged

Conversation

osmaczko
Copy link
Contributor

@osmaczko osmaczko commented Apr 7, 2022

required by: status-im/status-desktop#5424

accounts displayed to users on login page should display colorHash and
avatar fallback color (aka colorId)

@status-github-bot
Copy link

status-github-bot bot commented Apr 7, 2022

Pull Request Checklist

  • Have you updated the documentation, if impacted (e.g. docs.status.im)?
  • Have you tested changes with mobile?
  • Have you tested changes with desktop?

@status-im-auto
Copy link
Member

status-im-auto commented Apr 7, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b8ca47f #1 2022-04-07 19:29:59 ~2 min linux 📦zip
✔️ b8ca47f #1 2022-04-07 19:31:32 ~3 min android 📦aar
✔️ b8ca47f #1 2022-04-07 19:31:51 ~4 min ios 📦zip
✔️ 2953096 #2 2022-04-08 11:43:50 ~2 min ios 📦zip
✔️ 2953096 #2 2022-04-08 11:44:48 ~3 min android 📦aar
✔️ 2953096 #2 2022-04-08 11:45:25 ~4 min linux 📦zip

it returns color id for given pubkey
accounts displayed to users on login page should display colorHash and
avatar fallback color (aka colorId)
Comment on lines +284 to +285
colorHash, _ := colorhash.GenerateFor(string(acc.PublicKey.Bytes()))
colorID, _ := identityUtils.ToColorID(string(acc.PublicKey.Bytes()))
Copy link
Member

Choose a reason for hiding this comment

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

This is not bad per se, but i wonder if it would be a good idea to log an error in case any of these functions fail?

Copy link
Member

@iurimatias iurimatias left a comment

Choose a reason for hiding this comment

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

@iurimatias iurimatias merged commit 89626d9 into develop Apr 8, 2022
@iurimatias iurimatias deleted the feat/color-id-for-pubkey branch April 8, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants