Skip to content

Commit c596f4e

Browse files
committed
Fix ktlint warnings
1 parent 173d934 commit c596f4e

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,5 @@ interface ComposePlaceholderAdapter : PlaceholderManager.PlaceholderAdapter {
1010
* @param attrs aztec attributes of the view
1111
*/
1212
@Composable
13-
fun Placeholder(
14-
placeholderUuid: String,
15-
attrs: AztecAttributes,
16-
)
13+
fun Placeholder(placeholderUuid: String, attrs: AztecAttributes)
1714
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("ktlint")
2+
13
package org.wordpress.aztec.placeholders
24

35
import android.graphics.Rect
@@ -101,7 +103,7 @@ class ComposePlaceholderManager(
101103
.zIndex(9f)
102104
.padding(
103105
top = with(density) { composeView.topMargin.toDp() },
104-
start = with(density) { composeView.leftMargin.toDp() },
106+
start = with(density) { composeView.leftMargin.toDp() }
105107
)
106108
.width(
107109
with(density) { composeView.width.toDp() }
@@ -113,7 +115,7 @@ class ComposePlaceholderManager(
113115
key(composeView.uuid, composeView.width, composeView.height) {
114116
adapters[composeView.adapterKey]?.Placeholder(
115117
composeView.uuid,
116-
composeView.attrs,
118+
composeView.attrs
117119
)
118120
}
119121
}

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-
override suspend fun insertItem(type: String, vararg attributes: Pair<String, String>) {
99+
suspend override 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-
override suspend fun insertOrUpdateItem(
116+
suspend override 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-
override suspend fun removeOrUpdate(uuid: String, shouldUpdateItem: (Attributes) -> Boolean, updateItem: (currentAttributes: Map<String, String>) -> Map<String, String>): Boolean {
189+
suspend override 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)