1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-177 | Analytics | Create block as simple table event (#2440)

Co-authored-by: konstantiniiv <ki@anytype.io>
This commit is contained in:
Konstantin Ivanov 2022-07-27 10:33:30 +02:00 committed by GitHub
parent d983a6cfc1
commit 38df3ea93b
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View file

@ -344,9 +344,9 @@ data class Block(
object TableOfContents : Content()
object Unsupported : Content()
object Table: Content()
data class TableRow(val isHeader: Boolean): Content()
object TableColumn: Content()
object Table : Content()
data class TableRow(val isHeader: Boolean) : Content()
object TableColumn : Content()
}
/**
@ -385,7 +385,9 @@ data class Block(
data class Relation(
val key: Id
) : Prototype()
object TableOfContents : Prototype()
object SimpleTable : Prototype()
}
/**

View file

@ -574,6 +574,7 @@ class Orchestrator(
)
}
is Intent.Table.CreateTable -> {
val startTime = System.currentTimeMillis()
createTable(
params = CreateTable.Params(
ctx = intent.ctx,
@ -584,7 +585,15 @@ class Orchestrator(
)
).process(
failure = defaultOnError,
success = { payload -> proxies.payloads.send(payload) }
success = { payload ->
val middlewareTime = System.currentTimeMillis()
proxies.payloads.send(payload)
analytics.sendAnalyticsCreateBlockEvent(
prototype = Block.Prototype.SimpleTable,
startTime = startTime,
middlewareTime = middlewareTime
)
}
)
}
is Intent.Table.FillTableRow -> {

View file

@ -81,6 +81,9 @@ fun Block.Prototype.getAnalyticsEvent(
Block.Prototype.TableOfContents -> {
Props(mapOf(EventsPropertiesKey.type to "table_of_contents"))
}
Block.Prototype.SimpleTable -> {
Props(mapOf(EventsPropertiesKey.type to "simple_table"))
}
}
return EventAnalytics.Anytype(