Skip to content

Conversation-style icons are cropped incorrectly #4417

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

Closed
dkter opened this issue Nov 5, 2021 · 1 comment · Fixed by #4424
Closed

Conversation-style icons are cropped incorrectly #4417

dkter opened this issue Nov 5, 2021 · 1 comment · Fixed by #4424
Assignees
Labels
A-Notifications A-Shortcuts O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@dkter
Copy link
Contributor

dkter commented Nov 5, 2021

Steps to reproduce

Receive a notification

Intended result and actual result

What did you expect?

A correct icon crop (this is taken from #1809)
image

What happened instead?

The icon is not cropped into a square shape and has parts of the image cut off.
image

This was a bug I explicitly fixed in #1809 (see 5df0bd6) but it was reverted in 1.3.4, probably when this PR was merged: #3313
#3313 seems to add the exact same feature #1809 already added, and #1809 was merged before #3313. So merging #3313 didn't change much -- the only thing it changes (aside from changing removeAllDynamicShortcuts to removeLongLivedShortcuts) is duplicating some of the code that's already in ShortcutCreator in NotificationDrawerManager (albeit not using Bitmap.toProfileImageIcon, which should be used to render the room icons correctly).

Now every time a notification is received, the shortcut for that room is recreated using the notification code, which renders the icon incorrectly. Sometimes the shortcut will be recreated again with the original ShortcutCreator, which renders the icon correctly.

It looks like there's been a major refactoring of the notification code since #3313, but the redundant code still exists. I don't see a reason to keep it -- it hasn't changed anything behaviour-wise, at least for me, other than introducing this bug. If there's any reason this should be kept, it should use ShortcutCreator instead.

Your phone model

Pixel 3a

Operating system version

Android 12

Application version and app store

Tested on both Element 1.3.5 and 1.3.8-dev, GPlay variants

Homeserver

matrix.org

Will you send logs?

No

@dkter dkter added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Nov 5, 2021
@bmarty bmarty added A-Notifications A-Shortcuts O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist labels Nov 5, 2021
@ouchadam ouchadam self-assigned this Nov 11, 2021
@ouchadam
Copy link
Contributor

ouchadam commented Nov 18, 2021

Fixed in 1.3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications A-Shortcuts O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants