From 5ecd1ec0ac20bd73bceca16cc6abdccbd89f839e Mon Sep 17 00:00:00 2001 From: Konstantin Ivanov <54908981+konstantiniiv@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:45:20 +0100 Subject: [PATCH] DROID-947 Analytics | Update type name (#3018) --- .../main/java/com/anytypeio/anytype/core_models/Block.kt | 7 ++++++- .../presentation/sets/CreateDataViewViewerViewModel.kt | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core-models/src/main/java/com/anytypeio/anytype/core_models/Block.kt b/core-models/src/main/java/com/anytypeio/anytype/core_models/Block.kt index 35dd13b8e8..9776d4d920 100644 --- a/core-models/src/main/java/com/anytypeio/anytype/core_models/Block.kt +++ b/core-models/src/main/java/com/anytypeio/anytype/core_models/Block.kt @@ -302,7 +302,12 @@ data class Block( val coverRelationKey: String? = null ) { - enum class Type { GRID, LIST, GALLERY, BOARD } + enum class Type(val formattedName: String) { + GRID("Grid"), + LIST("List"), + GALLERY("Gallery"), + BOARD("Board") + } enum class Size { SMALL, MEDIUM, LARGE } diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/CreateDataViewViewerViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/CreateDataViewViewerViewModel.kt index eb17bb972d..8177b01f47 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/CreateDataViewViewerViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/sets/CreateDataViewViewerViewModel.kt @@ -44,7 +44,7 @@ class CreateDataViewViewerViewModel( }, success = { dispatcher.send(it).also { - sendAnalyticsAddViewEvent(analytics, dvType.name) + sendAnalyticsAddViewEvent(analytics, dvType.formattedName) state.value = ViewState.Completed } }