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:
parent
d983a6cfc1
commit
38df3ea93b
3 changed files with 18 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 -> {
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue