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

Commit 3c2ee27a authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing work tab is not updated when work-mode changes

Bug: 263399769
Test: Verified on device
Change-Id: I94d8f20bc70f2299d11d539d4821ba7e13253522
parent 7cb0133d
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -239,12 +239,12 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
            mAdapterItems.addAll(mSearchResults);
        } else {
            int position = 0;
            boolean addApps = true;
            if (mWorkProviderManager != null) {
                position += mWorkProviderManager.addWorkItems(mAdapterItems);
                if (!mWorkProviderManager.shouldShowWorkApps()) {
                    return;
                }
                addApps = mWorkProviderManager.shouldShowWorkApps();
            }
            if (addApps) {
                String lastSectionName = null;
                for (AppInfo info : mApps) {
                    mAdapterItems.add(AdapterItem.asApp(info));
@@ -258,6 +258,7 @@ public class AlphabeticalAppsList<T extends Context & ActivityContext> implement
                    position++;
                }
            }
        }
        mAccessibilityResultsCount = (int) mAdapterItems.stream()
                .filter(AdapterItem::isCountedForAccessibility).count();