mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-10 18:10:44 +09:00
DROID-922 Editor | Fix | Style panels should not leak click events to views beside it (#2894)
This commit is contained in:
parent
e420931752
commit
8e25539804
4 changed files with 19 additions and 1 deletions
|
@ -23,6 +23,11 @@ class StyleToolbarMainWidget @JvmOverloads constructor(
|
|||
LayoutInflater.from(context), this
|
||||
)
|
||||
|
||||
init {
|
||||
// Preventing click-through.
|
||||
binding.root.isClickable = true
|
||||
}
|
||||
|
||||
val styles = merge(
|
||||
binding.tvStyleTitle.clicks().map { UiBlock.HEADER_ONE },
|
||||
binding.tvStyleHeading.clicks().map { UiBlock.HEADER_TWO },
|
||||
|
|
|
@ -21,6 +21,11 @@ class StyleToolbarExtraWidget @JvmOverloads constructor(
|
|||
LayoutInflater.from(context), this, true
|
||||
)
|
||||
|
||||
init {
|
||||
// Preventing click-through.
|
||||
binding.root.isClickable = true
|
||||
}
|
||||
|
||||
val actions: Flow<StylingEvent> = merge(
|
||||
binding.bold.clicks().map { StylingEvent.Markup.Bold },
|
||||
binding.italic.clicks().map { StylingEvent.Markup.Italic },
|
||||
|
|
|
@ -4,9 +4,9 @@ import android.content.Context
|
|||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.cardview.widget.CardView
|
||||
import com.anytypeio.anytype.core_models.ThemeColor
|
||||
import com.anytypeio.anytype.core_ui.databinding.WidgetBlockStyleToolbarBackgroundBinding
|
||||
import com.anytypeio.anytype.core_ui.reactive.clicks
|
||||
import com.anytypeio.anytype.core_models.ThemeColor
|
||||
import com.anytypeio.anytype.presentation.editor.editor.styling.StyleToolbarState
|
||||
import com.anytypeio.anytype.presentation.editor.editor.styling.StylingEvent
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
@ -22,6 +22,11 @@ class StyleBackgroundToolbarWidget @JvmOverloads constructor(
|
|||
LayoutInflater.from(context), this, true
|
||||
)
|
||||
|
||||
init {
|
||||
// Preventing click-through.
|
||||
binding.root.isClickable = true
|
||||
}
|
||||
|
||||
val actions: Flow<StylingEvent> = merge(
|
||||
binding.flowColors.backgroundColorDefault.clicks()
|
||||
.map { StylingEvent.Coloring.Background(ThemeColor.DEFAULT) },
|
||||
|
|
|
@ -34,7 +34,10 @@ class StyleColorToolbarWidget @JvmOverloads constructor(
|
|||
LayoutInflater.from(context), this, true
|
||||
)
|
||||
|
||||
|
||||
|
||||
init {
|
||||
binding.root.isClickable = true
|
||||
setup()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue