Revert "composed Modifier changes (#9631)"

This reverts commit 434b8d3ae8.

# Conflicts:
#	app/src/main/java/eu/kanade/presentation/manga/components/ChapterDownloadIndicator.kt
#	presentation-core/src/main/java/tachiyomi/presentation/core/components/material/Tabs.kt
#	presentation-core/src/main/java/tachiyomi/presentation/core/util/Modifier.kt
This commit is contained in:
Cuong M. Tran 2024-06-15 18:51:47 +07:00
parent 4909d0ce57
commit cd7bc8860e
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 7 additions and 5 deletions

View file

@ -116,7 +116,7 @@ internal fun Modifier.highlightBackground(highlighted: Boolean): Modifier = comp
},
label = "highlight",
)
Modifier.background(color = highlight)
this then Modifier.background(color = highlight)
}
internal val TrailingWidgetBuffer = 16.dp

View file

@ -28,7 +28,7 @@ fun Modifier.selectedBackground(isSelected: Boolean): Modifier = if (isSelected)
composed {
val alpha = if (isSystemInDarkTheme()) 0.16f else 0.22f
val color = MaterialTheme.colorScheme.secondary.copy(alpha = alpha)
Modifier.drawBehind {
this then Modifier.drawBehind {
drawRect(color)
}
}
@ -79,7 +79,7 @@ fun Modifier.showSoftKeyboard(show: Boolean): Modifier = if (show) {
}
}
Modifier.focusRequester(focusRequester)
this then Modifier.focusRequester(focusRequester)
}
} else {
this
@ -102,12 +102,14 @@ fun Modifier.clearFocusOnSoftKeyboardHide(
keyboardShowedSinceFocused = true
} else if (keyboardShowedSinceFocused) {
focusManager.clearFocus()
onFocusCleared?.invoke()
if (onFocusCleared != null) {
onFocusCleared()
}
}
}
}
Modifier.onFocusChanged {
this then Modifier.onFocusChanged {
if (isFocused != it.isFocused) {
if (isFocused) {
keyboardShowedSinceFocused = false