Update async layout inflater to fix AppCompat views.

This commit is contained in:
Clark
2023-03-23 14:40:48 -04:00
committed by Cody Henthorne
parent d6a9ed1a8d
commit 98438ff8e4
4 changed files with 22 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ import androidx.annotation.LayoutRes;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.asynclayoutinflater.appcompat.AsyncAppCompatFactory;
import androidx.asynclayoutinflater.view.AsyncLayoutInflater;
import org.signal.core.util.ThreadUtil;
@@ -116,7 +117,7 @@ public class CachedInflater {
layoutDirection = currentLayoutDirection;
}
AsyncLayoutInflater inflater = new AsyncLayoutInflater(context);
AsyncLayoutInflater inflater = new AsyncLayoutInflater(context, new AsyncAppCompatFactory());
int existingCount = Util.getOrDefault(cache, layoutRes, Collections.emptyList()).size();
int inflateCount = Math.max(limit - existingCount, 0);