diff --git a/app/build.gradle b/app/build.gradle
index 7c8865c220..b84845c553 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -476,6 +476,8 @@ dependencies {
implementation libs.androidx.biometric
implementation libs.androidx.sharetarget
implementation libs.androidx.profileinstaller
+ implementation libs.androidx.asynclayoutinflater
+ implementation libs.androidx.asynclayoutinflater.appcompat
implementation (libs.firebase.messaging) {
exclude group: 'com.google.firebase', module: 'firebase-core'
diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/CachedInflater.java b/app/src/main/java/org/thoughtcrime/securesms/util/CachedInflater.java
index 4a369fc303..4e40948676 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/util/CachedInflater.java
+++ b/app/src/main/java/org/thoughtcrime/securesms/util/CachedInflater.java
@@ -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);
diff --git a/dependencies.gradle b/dependencies.gradle
index 01e799c770..f4e432fd17 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -74,6 +74,8 @@ dependencyResolutionManagement {
alias('androidx-sqlite').to('androidx.sqlite:sqlite:2.1.0')
alias('androidx-core-role').to('androidx.core:core-role:1.0.0')
alias('androidx-profileinstaller').to('androidx.profileinstaller:profileinstaller:1.2.2')
+ alias('androidx-asynclayoutinflater').to('androidx.asynclayoutinflater:asynclayoutinflater:1.1.0-alpha01')
+ alias('androidx-asynclayoutinflater-appcompat').to('androidx.asynclayoutinflater:asynclayoutinflater-appcompat:1.1.0-alpha01')
// Material
alias('material-material').to('com.google.android.material:material:1.8.0')
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 195528e5a0..ea2247dbb6 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -159,6 +159,22 @@ https://docs.gradle.org/current/userguide/dependency_verification.html
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+