From 351ba608748e1f137611f43a6cf72ba85d54149a Mon Sep 17 00:00:00 2001 From: Gustavo Figueiredo Date: Tue, 20 Feb 2024 13:53:47 -0300 Subject: [PATCH] Adjust cast --- .../br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/delegate/src/main/kotlin/br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt b/toolkit/delegate/src/main/kotlin/br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt index 069bd145..1a341564 100644 --- a/toolkit/delegate/src/main/kotlin/br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt +++ b/toolkit/delegate/src/main/kotlin/br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt @@ -35,7 +35,7 @@ class ExtraProviderDelegate( ExtraType.QUERY -> getQueryParameter(extra, extraName, thisRef) ?: defaultValue.invoke() ExtraType.AUTO -> getExtra(extra, extraName, thisRef) ?: (if (extra is String?) getQueryParameter(extra, extraName, thisRef) else null) - ?: thisRef.activity?.let { getExtra(extra, extraName, it) } + ?: (thisRef.activity as? AppCompatActivity)?.let { getExtra(extra, extraName, it) } ?: defaultValue.invoke() }