Skip to content

Commit 4299db6

Browse files
committed
Fix AztecPlaceholderSpan.kt
1 parent c8c70e7 commit 4299db6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

media-placeholders/src/main/java/org/wordpress/aztec/placeholders/AztecPlaceholderSpan.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.wordpress.aztec.placeholders
22

33
import android.content.Context
44
import android.graphics.drawable.Drawable
5+
import kotlinx.coroutines.runBlocking
56
import org.wordpress.aztec.AztecAttributes
67
import org.wordpress.aztec.AztecText
78
import org.wordpress.aztec.spans.AztecMediaSpan
@@ -23,6 +24,6 @@ class AztecPlaceholderSpan(
2324
}
2425

2526
override fun getMaxWidth(editorWidth: Int): Int {
26-
return adapter.calculateWidth(attributes, editorWidth)
27+
return runBlocking { adapter.calculateWidth(attributes, editorWidth) }
2728
}
2829
}

0 commit comments

Comments
 (0)