Conversation-style icons are cropped incorrectly #4417
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
Steps to reproduce
Receive a notification
Intended result and actual result
What did you expect?
A correct icon crop (this is taken from #1809)

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

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
toremoveLongLivedShortcuts
) is duplicating some of the code that's already in ShortcutCreator in NotificationDrawerManager (albeit not usingBitmap.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
The text was updated successfully, but these errors were encountered: