diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 610285da55..0b20b2b429 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,7 +3,7 @@ on: pull_request: # add "synchronize" in "types", in order to trigger workflow for pull request commit(s) pushes. types: [opened] - branches: [develop] + branches: [develop, release/0-10-0] name: Run debug unit tests jobs: setup-android: diff --git a/core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt b/core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt index 879f4aacb0..662b1fb3cc 100644 --- a/core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt +++ b/core-models/src/main/java/com/anytypeio/anytype/core_models/ObjectWrapper.kt @@ -90,7 +90,7 @@ sealed class ObjectWrapper { private val default = map.withDefault { null } val name: String? by default val description: String? by default - val url: String? by default + val source: String? by default val iconEmoji: String? by default val iconImage: String? by default val picture: String? by default diff --git a/core-models/src/main/java/com/anytypeio/anytype/core_models/Relations.kt b/core-models/src/main/java/com/anytypeio/anytype/core_models/Relations.kt index d2b8729cc6..b30aa32666 100644 --- a/core-models/src/main/java/com/anytypeio/anytype/core_models/Relations.kt +++ b/core-models/src/main/java/com/anytypeio/anytype/core_models/Relations.kt @@ -32,6 +32,7 @@ object Relations { const val SET_OF = "setOf" const val IS_HIGHLIGHTED = "isHighlighted" const val URL = "url" + const val SOURCE = "source" const val PAGE_COVER = "pageCover" diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt index 35f26baf7e..df5c4e321b 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/render/DefaultBlockViewRenderer.kt @@ -1259,7 +1259,7 @@ class DefaultBlockViewRenderer @Inject constructor( } else { BlockView.Media.Bookmark( id = block.id, - url = obj.url.orEmpty(), + url = obj.source.orEmpty(), title = obj.name, description = obj.description, imageUrl = obj.picture?.let { urlBuilder.image(it) }, diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/RelationTextValueViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/RelationTextValueViewModel.kt index 17a33ce915..3e04cd7b42 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/RelationTextValueViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/RelationTextValueViewModel.kt @@ -107,7 +107,7 @@ class RelationTextValueViewModel( actions.value = buildList { add(RelationValueAction.Url.Browse(value)) add(RelationValueAction.Url.Copy(value)) - if (relation.key == Relations.URL && obj.type.contains(ObjectType.BOOKMARK_TYPE)) { + if (relation.key == Relations.SOURCE && obj.type.contains(ObjectType.BOOKMARK_TYPE)) { add(RelationValueAction.Url.Reload(value)) } } diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/DefaultBlockViewRendererTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/DefaultBlockViewRendererTest.kt index 046b847002..cc5bcbcbae 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/DefaultBlockViewRendererTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/DefaultBlockViewRendererTest.kt @@ -5231,7 +5231,7 @@ class DefaultBlockViewRendererTest { mapOf( Relations.NAME to bookmarkTitle, Relations.DESCRIPTION to bookmarkDescription, - Relations.URL to bookmarkUrl + Relations.SOURCE to bookmarkUrl ) ) ) diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorLockPageTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorLockPageTest.kt index f9c0c1fcee..8b312e5462 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorLockPageTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/editor/editor/EditorLockPageTest.kt @@ -502,7 +502,7 @@ class EditorLockPageTest : EditorPresentationTestSetup() { mapOf( Relations.NAME to bookmarkTitle, Relations.DESCRIPTION to bookmarkDescription, - Relations.URL to bookmarkUrl + Relations.SOURCE to bookmarkUrl ) ) )