From a17743e56aaa19e302e21f8d3978552b24cb10f7 Mon Sep 17 00:00:00 2001 From: Konstantin Ivanov <54908981+konstantiniiv@users.noreply.github.com> Date: Thu, 8 Sep 2022 11:53:24 +0200 Subject: [PATCH] DROID-417 Set | Get records, after source set (#2587) * DROID-417 turn off change set source * DROID-417 get records after block view block added * DROID-417 link to task * DROID-417 add delay to test * DROID-417 fix test setup, should be proper filter by description style * DROID-417 ci * DROID-417 ci off Co-authored-by: konstantiniiv --- .../core_ui/widgets/FeaturedRelationGroupWidget.kt | 11 ++++++----- .../anytype/presentation/sets/ObjectSetReducer.kt | 1 + .../presentation/editor/editor/EditorFocusTest.kt | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/widgets/FeaturedRelationGroupWidget.kt b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/widgets/FeaturedRelationGroupWidget.kt index ce5c83b6b7..f3ca26c779 100644 --- a/core-ui/src/main/java/com/anytypeio/anytype/core_ui/widgets/FeaturedRelationGroupWidget.kt +++ b/core-ui/src/main/java/com/anytypeio/anytype/core_ui/widgets/FeaturedRelationGroupWidget.kt @@ -274,11 +274,12 @@ class FeaturedRelationGroupWidget : ConstraintLayout { } } } - view.setOnClickListener { - click( - ListenerType.Relation.SetSource(sources = relation.sources) - ) - } +// todo https://linear.app/anytype/issue/DROID-434/set-or-change-set-source +// view.setOnClickListener { +// click( +// ListenerType.Relation.SetSource(sources = relation.sources) +// ) +// } addView(view) ids.add(view.id) } diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/ObjectSetReducer.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/ObjectSetReducer.kt index b3240081fb..59be5aa908 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/ObjectSetReducer.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/ObjectSetReducer.kt @@ -186,6 +186,7 @@ class ObjectSetReducer { ) } is Command.AddBlock -> { + effects.add(SideEffect.ResetViewer) state.copy( blocks = state.blocks + event.blocks ) diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorFocusTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorFocusTest.kt index 6bb4f64cdd..81e2c10570 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorFocusTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorFocusTest.kt @@ -202,7 +202,7 @@ class EditorFocusTest : EditorPresentationTestSetup() { val style = Block.Content.Text.Style.values() .filter { style -> - style != Block.Content.Text.Style.TITLE || style != Block.Content.Text.Style.DESCRIPTION + style != Block.Content.Text.Style.TITLE && style != Block.Content.Text.Style.DESCRIPTION } .random()