From b9354b8ff7a4b7ee3010e8938093816a003ba09e Mon Sep 17 00:00:00 2001 From: Gustavo Figueiredo Date: Tue, 20 Feb 2024 12:33:55 -0300 Subject: [PATCH] Check for Activity extra as well --- .../kotlin/br/com/arch/toolkit/delegate/ExtraProviderDelegate.kt | 1 + 1 file changed, 1 insertion(+) 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 1461684b..069bd145 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,6 +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) } ?: defaultValue.invoke() }