Skip to content

Commit b7768e3

Browse files
committed
Merge remote-tracking branch 'origin/feature/compose-placeholders' into feature/compose-placeholders
2 parents 0b84d74 + f5c3063 commit b7768e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ViewPlaceholderManager(
9696
* @param type placeholder type
9797
* @param attributes other attributes passed to the view. For example a `src` for an image.
9898
*/
99-
suspend override fun insertItem(type: String, vararg attributes: Pair<String, String>) {
99+
override suspend fun insertItem(type: String, vararg attributes: Pair<String, String>) {
100100
val adapter = adapters[type]
101101
?: throw IllegalArgumentException("Adapter for inserted type not found. Register it with `registerAdapter` method")
102102
val attrs = getAttributesForMedia(type, attributes)
@@ -113,7 +113,7 @@ class ViewPlaceholderManager(
113113
* @param shouldMergeItem this method should return true when the previous type is compatible and should be updated
114114
* @param updateItem function to update current parameters with new params
115115
*/
116-
suspend override fun insertOrUpdateItem(
116+
override suspend fun insertOrUpdateItem(
117117
type: String,
118118
shouldMergeItem: (currentItemType: String) -> Boolean,
119119
updateItem: (
@@ -186,7 +186,7 @@ class ViewPlaceholderManager(
186186
* @param shouldUpdateItem This function should return true if the span can be updated, false if it should be removed
187187
* @param updateItem Function that updates the selected item
188188
*/
189-
suspend override fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map<String, String>) -> Map<String, String>): Boolean {
189+
override suspend fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map<String, String>) -> Map<String, String>): Boolean {
190190
val currentItem = aztecText.editableText.getSpans(0, aztecText.length(), AztecPlaceholderSpan::class.java).find {
191191
it.attributes.getValue(UUID_ATTRIBUTE) == uuid
192192
} ?: return false

0 commit comments

Comments
 (0)