diff --git a/build.gradle b/build.gradle index 800a4fb9..4665fd0f 100644 --- a/build.gradle +++ b/build.gradle @@ -6,5 +6,5 @@ buildscript { plugins { id 'com.android.application' version '7.3.1' apply false id 'com.android.library' version '7.3.1' apply false - id 'org.jetbrains.kotlin.android' version '1.7.20' apply false + id 'org.jetbrains.kotlin.android' version '1.8.21' apply false } \ No newline at end of file diff --git a/compose-example/build.gradle b/compose-example/build.gradle index 5e059425..fc8fbe59 100644 --- a/compose-example/build.gradle +++ b/compose-example/build.gradle @@ -27,17 +27,17 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } buildFeatures { compose true } composeOptions { - kotlinCompilerExtensionVersion '1.3.2' + kotlinCompilerExtensionVersion '1.4.7' } packagingOptions { resources { diff --git a/lib/src/main/java/com/basistheory/android/view/TextElement.kt b/lib/src/main/java/com/basistheory/android/view/TextElement.kt index 5aab1969..f15bceee 100644 --- a/lib/src/main/java/com/basistheory/android/view/TextElement.kt +++ b/lib/src/main/java/com/basistheory/android/view/TextElement.kt @@ -279,9 +279,9 @@ open class TextElement @JvmOverloads constructor( _editText.onFocusChangeListener = OnFocusChangeListener { _, hasFocus -> if (hasFocus) - _eventListeners.focus.forEach { it(FocusEvent()) } + _eventListeners.focus.iterator().forEach { it(FocusEvent()) } else - _eventListeners.blur.forEach { it(BlurEvent()) } + _eventListeners.blur.iterator().forEach { it(BlurEvent()) } } } @@ -319,7 +319,7 @@ open class TextElement @JvmOverloads constructor( protected fun publishChangeEvent() { val event = createElementChangeEvent() - _eventListeners.change.forEach { + _eventListeners.change.iterator().forEach { it(event) } }