diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/home/HomeScreenViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/home/HomeScreenViewModel.kt index a286ec1bbf..e26208a8ba 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/home/HomeScreenViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/home/HomeScreenViewModel.kt @@ -2395,7 +2395,7 @@ fun ObjectWrapper.Basic.navigation() : OpenObjectNavigation { space = requireNotNull(spaceId) ) } - ObjectType.Layout.CHAT -> { + ObjectType.Layout.CHAT_DERIVED -> { OpenObjectNavigation.OpenDiscussion( target = id, space = requireNotNull(spaceId) @@ -2441,7 +2441,7 @@ fun ObjectType.Layout.navigation( space = space ) } - ObjectType.Layout.CHAT -> { + ObjectType.Layout.CHAT_DERIVED -> { OpenObjectNavigation.OpenDiscussion( target = target, space = space diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/ObjectTypeChangeViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/ObjectTypeChangeViewModel.kt index 5f1253356f..9fe1501745 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/ObjectTypeChangeViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/ObjectTypeChangeViewModel.kt @@ -56,9 +56,9 @@ class ObjectTypeChangeViewModel( private val pipeline = combine(searchQuery, setup) { query, setup -> val recommendedLayouts = if (setup.isWithFiles) { - SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts } else { - SupportedLayouts.editorLayouts + listOf(ObjectType.Layout.CHAT) + SupportedLayouts.editorLayouts } val myTypes = proceedWithGettingMyTypes( query = query, diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/SupportedLayouts.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/SupportedLayouts.kt index 2c5cb57e6e..f1972cc238 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/SupportedLayouts.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/objects/SupportedLayouts.kt @@ -16,8 +16,7 @@ object SupportedLayouts { ObjectType.Layout.NOTE, ObjectType.Layout.BOOKMARK, ObjectType.Layout.AUDIO, - ObjectType.Layout.PDF, - ObjectType.Layout.CHAT + ObjectType.Layout.PDF ) val editorLayouts = listOf( ObjectType.Layout.BASIC, @@ -53,8 +52,7 @@ object SupportedLayouts { ObjectType.Layout.COLLECTION, ObjectType.Layout.TODO, ObjectType.Layout.NOTE, - ObjectType.Layout.BOOKMARK, - ObjectType.Layout.CHAT + ObjectType.Layout.BOOKMARK ) val addAsLinkToLayouts = editorLayouts + listOf( diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/relations/LimitObjectTypeViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/relations/LimitObjectTypeViewModel.kt index cb474c8952..1b22b108c3 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/relations/LimitObjectTypeViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/relations/LimitObjectTypeViewModel.kt @@ -95,7 +95,6 @@ class LimitObjectTypeViewModel( relation = Relations.RECOMMENDED_LAYOUT, condition = DVFilterCondition.NOT_IN, value = listOf( - ObjectType.Layout.CHAT.code.toDouble(), ObjectType.Layout.CHAT_DERIVED.code.toDouble() ) ) diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/search/ObjectSearchConstants.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/search/ObjectSearchConstants.kt index 6c4c31edff..9525aff4b8 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/search/ObjectSearchConstants.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/search/ObjectSearchConstants.kt @@ -314,10 +314,7 @@ object ObjectSearchConstants { DVFilter( relation = Relations.RECOMMENDED_LAYOUT, condition = DVFilterCondition.NOT_IN, - value = listOf( - ObjectType.Layout.CHAT.code.toDouble(), - ObjectType.Layout.CHAT_DERIVED.code.toDouble() - ) + value = listOf(ObjectType.Layout.CHAT_DERIVED.code.toDouble()) ) ) } diff --git a/presentation/src/test/java/com/anytypeio/anytype/presentation/types/ObjectTypeChangeViewModelTest.kt b/presentation/src/test/java/com/anytypeio/anytype/presentation/types/ObjectTypeChangeViewModelTest.kt index 32c76c15f1..7668a1be50 100644 --- a/presentation/src/test/java/com/anytypeio/anytype/presentation/types/ObjectTypeChangeViewModelTest.kt +++ b/presentation/src/test/java/com/anytypeio/anytype/presentation/types/ObjectTypeChangeViewModelTest.kt @@ -109,7 +109,7 @@ class ObjectTypeChangeViewModelTest { val vm = givenViewModel() val expectedMyTypesFilters = ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts ) // TESTING @@ -152,7 +152,7 @@ class ObjectTypeChangeViewModelTest { val vm = givenViewModel() val expectedMyTypesFilters = ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts ) val expectedMyTypeKeys = ObjectSearchConstants.defaultKeysObjectType @@ -248,7 +248,7 @@ class ObjectTypeChangeViewModelTest { val vm = givenViewModel() val expectedMyTypesFilters = ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts ) val expectedMyTypeKeys = ObjectSearchConstants.defaultKeysObjectType @@ -426,7 +426,7 @@ class ObjectTypeChangeViewModelTest { val expectedInstalledTypeUniqueKey = ObjectTypeIds.PAGE val expectedMyTypesFilters = ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts ) val expectedMyTypeKeys = ObjectSearchConstants.defaultKeysObjectType @@ -434,7 +434,7 @@ class ObjectTypeChangeViewModelTest { val expectedMarketplaceTypeFilters = buildList { addAll( ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts + SupportedLayouts.fileLayouts ) ) add( @@ -566,7 +566,7 @@ class ObjectTypeChangeViewModelTest { val vm = givenViewModel() val expectedMyTypesFilters = ObjectSearchConstants.filterTypes( - recommendedLayouts = SupportedLayouts.editorLayouts + listOf(ObjectType.Layout.CHAT) + recommendedLayouts = SupportedLayouts.editorLayouts ) // TESTING