From bd9ad6fbd76d959ffc30d60d2c84086bb071a10e Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Sun, 16 Feb 2025 21:50:05 +0100 Subject: [PATCH] Remove non-needed text style --- .../mohamedrejeb/richeditor/ui/BasicRichTextEditor.android.kt | 2 -- .../com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.kt | 4 ---- .../mohamedrejeb/richeditor/ui/BasicRichTextEditor.desktop.kt | 2 -- .../com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.ios.kt | 2 -- .../com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.js.kt | 2 -- .../mohamedrejeb/richeditor/ui/BasicRichTextEditor.wasmJs.kt | 2 -- 6 files changed, 14 deletions(-) diff --git a/richeditor-compose/src/androidMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.android.kt b/richeditor-compose/src/androidMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.android.kt index 4f61c5a9..e8faffb7 100644 --- a/richeditor-compose/src/androidMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.android.kt +++ b/richeditor-compose/src/androidMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.android.kt @@ -2,7 +2,6 @@ package com.mohamedrejeb.richeditor.ui import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection import com.mohamedrejeb.richeditor.model.RichTextState @@ -11,7 +10,6 @@ import kotlinx.coroutines.CoroutineScope internal actual fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope, diff --git a/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.kt b/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.kt index dfdd3ec8..9aac4a8c 100644 --- a/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.kt +++ b/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.kt @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.text.BasicTextField import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material3.LocalTextStyle import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.focus.focusProperties @@ -196,7 +195,6 @@ public fun BasicRichTextEditor( contentPadding: PaddingValues ) { val density = LocalDensity.current - val localTextStyle = LocalTextStyle.current val layoutDirection = LocalLayoutDirection.current val clipboardManager = LocalClipboardManager.current val richClipboardManager = remember(state) { @@ -268,7 +266,6 @@ public fun BasicRichTextEditor( .adjustTextIndicatorOffset( state = state, contentPadding = contentPadding, - textStyle = localTextStyle, density = density, layoutDirection = layoutDirection, scope = rememberCoroutineScope() @@ -300,7 +297,6 @@ public fun BasicRichTextEditor( internal expect fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope, diff --git a/richeditor-compose/src/desktopMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.desktop.kt b/richeditor-compose/src/desktopMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.desktop.kt index db8cd20c..4fea50d2 100644 --- a/richeditor-compose/src/desktopMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.desktop.kt +++ b/richeditor-compose/src/desktopMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.desktop.kt @@ -6,7 +6,6 @@ import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.input.pointer.PointerEventType import androidx.compose.ui.input.pointer.onPointerEvent -import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection import com.mohamedrejeb.richeditor.model.RichTextState @@ -17,7 +16,6 @@ import kotlinx.coroutines.launch internal actual fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope, diff --git a/richeditor-compose/src/iosMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.ios.kt b/richeditor-compose/src/iosMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.ios.kt index 4f61c5a9..e8faffb7 100644 --- a/richeditor-compose/src/iosMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.ios.kt +++ b/richeditor-compose/src/iosMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.ios.kt @@ -2,7 +2,6 @@ package com.mohamedrejeb.richeditor.ui import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection import com.mohamedrejeb.richeditor.model.RichTextState @@ -11,7 +10,6 @@ import kotlinx.coroutines.CoroutineScope internal actual fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope, diff --git a/richeditor-compose/src/jsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.js.kt b/richeditor-compose/src/jsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.js.kt index 4f61c5a9..e8faffb7 100644 --- a/richeditor-compose/src/jsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.js.kt +++ b/richeditor-compose/src/jsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.js.kt @@ -2,7 +2,6 @@ package com.mohamedrejeb.richeditor.ui import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection import com.mohamedrejeb.richeditor.model.RichTextState @@ -11,7 +10,6 @@ import kotlinx.coroutines.CoroutineScope internal actual fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope, diff --git a/richeditor-compose/src/wasmJsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.wasmJs.kt b/richeditor-compose/src/wasmJsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.wasmJs.kt index 823aeac3..c5181d49 100644 --- a/richeditor-compose/src/wasmJsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.wasmJs.kt +++ b/richeditor-compose/src/wasmJsMain/kotlin/com/mohamedrejeb/richeditor/ui/BasicRichTextEditor.wasmJs.kt @@ -2,7 +2,6 @@ package com.mohamedrejeb.richeditor.ui import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.LayoutDirection import com.mohamedrejeb.richeditor.model.RichTextState @@ -11,7 +10,6 @@ import kotlinx.coroutines.CoroutineScope internal actual fun Modifier.adjustTextIndicatorOffset( state: RichTextState, contentPadding: PaddingValues, - textStyle: TextStyle, density: Density, layoutDirection: LayoutDirection, scope: CoroutineScope