diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/widget/BasePreferenceWidget.kt b/app/src/main/java/eu/kanade/presentation/more/settings/widget/BasePreferenceWidget.kt index bba72cf98..9ab4c1af0 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/widget/BasePreferenceWidget.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/widget/BasePreferenceWidget.kt @@ -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 diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/util/Modifier.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/util/Modifier.kt index 875cd4583..cfae146ef 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/util/Modifier.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/util/Modifier.kt @@ -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