Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/compose-placeholders' in…
Browse files Browse the repository at this point in the history
…to feature/compose-placeholders
  • Loading branch information
planarvoid committed Jan 23, 2025
2 parents 0b84d74 + f5c3063 commit b7768e3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ViewPlaceholderManager(
* @param type placeholder type
* @param attributes other attributes passed to the view. For example a `src` for an image.
*/
suspend override fun insertItem(type: String, vararg attributes: Pair<String, String>) {
override suspend fun insertItem(type: String, vararg attributes: Pair<String, String>) {
val adapter = adapters[type]
?: throw IllegalArgumentException("Adapter for inserted type not found. Register it with `registerAdapter` method")
val attrs = getAttributesForMedia(type, attributes)
Expand All @@ -113,7 +113,7 @@ class ViewPlaceholderManager(
* @param shouldMergeItem this method should return true when the previous type is compatible and should be updated
* @param updateItem function to update current parameters with new params
*/
suspend override fun insertOrUpdateItem(
override suspend fun insertOrUpdateItem(
type: String,
shouldMergeItem: (currentItemType: String) -> Boolean,
updateItem: (
Expand Down Expand Up @@ -186,7 +186,7 @@ class ViewPlaceholderManager(
* @param shouldUpdateItem This function should return true if the span can be updated, false if it should be removed
* @param updateItem Function that updates the selected item
*/
suspend override fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map<String, String>) -> Map<String, String>): Boolean {
override suspend fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map<String, String>) -> Map<String, String>): Boolean {
val currentItem = aztecText.editableText.getSpans(0, aztecText.length(), AztecPlaceholderSpan::class.java).find {
it.attributes.getValue(UUID_ATTRIBUTE) == uuid
} ?: return false
Expand Down

0 comments on commit b7768e3

Please sign in to comment.