mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Fixing work tab is not updated when work-mode changes
Bug: 263399769 Test: Verified on device Change-Id: I94d8f20bc70f2299d11d539d4821ba7e13253522
This commit is contained in:
@@ -239,23 +239,24 @@ 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();
|
||||
}
|
||||
String lastSectionName = null;
|
||||
for (AppInfo info : mApps) {
|
||||
mAdapterItems.add(AdapterItem.asApp(info));
|
||||
if (addApps) {
|
||||
String lastSectionName = null;
|
||||
for (AppInfo info : mApps) {
|
||||
mAdapterItems.add(AdapterItem.asApp(info));
|
||||
|
||||
String sectionName = info.sectionName;
|
||||
// Create a new section if the section names do not match
|
||||
if (!sectionName.equals(lastSectionName)) {
|
||||
lastSectionName = sectionName;
|
||||
mFastScrollerSections.add(new FastScrollSectionInfo(sectionName, position));
|
||||
String sectionName = info.sectionName;
|
||||
// Create a new section if the section names do not match
|
||||
if (!sectionName.equals(lastSectionName)) {
|
||||
lastSectionName = sectionName;
|
||||
mFastScrollerSections.add(new FastScrollSectionInfo(sectionName, position));
|
||||
}
|
||||
position++;
|
||||
}
|
||||
position++;
|
||||
}
|
||||
}
|
||||
mAccessibilityResultsCount = (int) mAdapterItems.stream()
|
||||
|
||||
Reference in New Issue
Block a user