diff --git a/domain/src/main/java/com/anytypeio/anytype/domain/search/ObjectTypesSubscriptionManager.kt b/domain/src/main/java/com/anytypeio/anytype/domain/search/ObjectTypesSubscriptionManager.kt index 9daeeff769..d18935837a 100644 --- a/domain/src/main/java/com/anytypeio/anytype/domain/search/ObjectTypesSubscriptionManager.kt +++ b/domain/src/main/java/com/anytypeio/anytype/domain/search/ObjectTypesSubscriptionManager.kt @@ -74,11 +74,6 @@ class ObjectTypesSubscriptionManager ( condition = DVFilterCondition.EQUAL, value = ObjectType.Layout.OBJECT_TYPE.code.toDouble() ), - DVFilter( - relation = Relations.SPACE_ID, - condition = DVFilterCondition.EQUAL, - value = config.space - ), DVFilter( relation = Relations.IS_DELETED, condition = DVFilterCondition.NOT_EQUAL, @@ -86,8 +81,7 @@ class ObjectTypesSubscriptionManager ( ), DVFilter( relation = Relations.IS_ARCHIVED, - condition = DVFilterCondition.NOT_EQUAL, - value = true + condition = DVFilterCondition.NONE ), DVFilter( relation = Relations.UNIQUE_KEY, @@ -124,6 +118,7 @@ class ObjectTypesSubscriptionManager ( Relations.RECOMMENDED_FEATURED_RELATIONS, Relations.RECOMMENDED_HIDDEN_RELATIONS, Relations.RECOMMENDED_FILE_RELATIONS, + Relations.IS_ARCHIVED ), ignoreWorkspace = true ) diff --git a/feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/ObjectTypeViewModel.kt b/feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/ObjectTypeViewModel.kt index ca5ba7cd16..10b0bac9dd 100644 --- a/feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/ObjectTypeViewModel.kt +++ b/feature-object-type/src/main/java/com/anytypeio/anytype/feature_object_type/viewmodel/ObjectTypeViewModel.kt @@ -181,7 +181,7 @@ class ObjectTypeViewModel( //region INIT AND LIFE CYCLE init { - Timber.d("init, vmParams: $vmParams") + Timber.i("ObjectTypeViewModel init, vmParams: $vmParams") proceedWithObservingSyncStatus() proceedWithObservingObjectType() proceedWithGetObjectTypeConflictingFields() diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/types/SpaceTypesViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/types/SpaceTypesViewModel.kt index 3e75bc4efc..2bfdbdd209 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/types/SpaceTypesViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/types/SpaceTypesViewModel.kt @@ -65,7 +65,7 @@ class SpaceTypesViewModel( storeOfObjectTypes.getAll().mapNotNull { objectType -> val resolvedLayout = objectType.recommendedLayout ?: return@mapNotNull null - if (notAllowedTypesLayouts.contains(resolvedLayout)) { + if (notAllowedTypesLayouts.contains(resolvedLayout) || objectType.isArchived == true) { return@mapNotNull null } else { objectType