Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33f923ec authored by Andrey Epin's avatar Andrey Epin
Browse files

Update icon only once

We have multiple LoadIconTasks started for the same icon, first from the
list view measurement and then from the actual view biding. We let all
those tasks to update the UI which riggered (through an observed but not
precicly comprehended mechanism) multiple announcements for the first
item in the list.
Ideally, we should have only one loading task for an item, but that
would be a more complex fix. Instead, we just let the winning task to
update the UI.

Fix: 238681660
Test: Manual test.
Change-Id: I8cc7a9a12a3b2e9e49834500d8b7d2bf3e6367d3
parent cb1af1ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -950,7 +950,7 @@ public class ResolverListAdapter extends BaseAdapter {
        protected void onPostExecute(Drawable d) {
        protected void onPostExecute(Drawable d) {
            if (getOtherProfile() == mDisplayResolveInfo) {
            if (getOtherProfile() == mDisplayResolveInfo) {
                mResolverListCommunicator.updateProfileViewButton();
                mResolverListCommunicator.updateProfileViewButton();
            } else {
            } else if (!mDisplayResolveInfo.hasDisplayIcon()) {
                mDisplayResolveInfo.setDisplayIcon(d);
                mDisplayResolveInfo.setDisplayIcon(d);
                mHolder.bindIcon(mDisplayResolveInfo);
                mHolder.bindIcon(mDisplayResolveInfo);
                // Notify in case view is already bound to resolve the race conditions on
                // Notify in case view is already bound to resolve the race conditions on