Niagara-Issues icon indicating copy to clipboard operation
Niagara-Issues copied to clipboard

Wrong icon for Niagara Settings when scrolling fast after cache clear

Open F1nnM opened this issue 2 years ago • 4 comments

Describe the bug

When the phone cache is cleared, manually or over night or after a reboot and you scroll down quickly the icon for the niegara settings is displaying a random app icon for a few seconds.

While this fixes itself within seconds and doesn't impact use ability, it's been bugging me forever, so I finally decided to file a report.

Steps to reproduce

  1. Clear your phone cache
  2. Scroll down the app list quickly

Device name

Xiaomi Mi 10 Lite

Android version

Android 12

Screenshots / Screen recordings

Here for example it took the icon of my recorder app:

IMG_20220104_125943

F1nnM avatar Jan 04 '22 12:01 F1nnM

Weird, I cannot reproduce this on my end. The icons aren't stored in the cache anyways, they are only loaded from the app resources into the RAM. Are you using some sort of theme engine by any chance?

Maxr1998 avatar Jan 04 '22 12:01 Maxr1998

Nope, I'm not using any theme engine. Only a custom icon pack - whicons.

From my dabbling with Android it seems like a bug or incorrect use of a RecyclerView.

Interestingly only the niagara settings are affected, not the regular App Icons.

My guess would be that the app icons are somewhat preloaded and can immediately be accessed by the viewholder in the RecyclerView, but the niagara settings icon is not. So when it has to be shown for the first time, the RecyclerView reuses an element from before and it shows the old app icon, until the settings icon is loaded.

F1nnM avatar Jan 04 '22 13:01 F1nnM

We do load the icon asynchronously as a performance optimization, so that may indeed be the reason. But I'm surprised it only happens on the settings icon though, since that should actually be less expensive to load than the app icons. And even then it's a fraction of a second, not "a few seconds". I need to investigate this further.

Maxr1998 avatar Jan 04 '22 14:01 Maxr1998

Also happens for the new "Recently installed" item. It didn't happen with the "Niagara settings" item, but that might have been a fluke.

F1nnM avatar Apr 12 '22 08:04 F1nnM

Merged with https://github.com/8bitPit/Niagara-Issues/issues/2033

8bitPit avatar Aug 30 '22 06:08 8bitPit