From f43d5e203aa098d661fc9e181979270e38e78501 Mon Sep 17 00:00:00 2001 From: Mario Zorz Date: Thu, 23 Nov 2017 19:55:59 -0300 Subject: [PATCH] fixed call to onMediaDeleted --- .../org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt b/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt index faa049e5f..fb292958b 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt @@ -14,7 +14,7 @@ class DeleteMediaElementWatcher(aztecText: AztecText) : TextWatcher { return } - if (count > 0) { + if (count > 0 && count != after) { aztecTextRef.get()?.text?.getSpans(start, start + count, AztecMediaSpan::class.java) ?.forEach { it.onMediaDeleted()