Skip to content

Commit

Permalink
Sync analytics plan
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty authored Jul 24, 2023
1 parent 14d6914 commit 99dfeb7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,46 @@ data class Composer(
* event.
*/
val isEditing: Boolean,
/**
* Whether this message it's a shared location.
*/
val isLocation: Boolean,
/**
* Whether the user's composer interaction was a reply to a previously
* sent event.
*/
val isReply: Boolean,
/**
* The type of the shared location
*/
val locationType: LocationType? = null,
/**
* Whether this message begins a new thread or not.
*/
val startsThread: Boolean? = null,
) : VectorAnalyticsEvent {

enum class LocationType {
/**
* User current location
*/
MyLocation,

/**
* Pin drop location
*/
PinDrop,
}

override fun getName() = "Composer"

override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
put("inThread", inThread)
put("isEditing", isEditing)
put("isLocation", isLocation)
put("isReply", isReply)
locationType?.let { put("locationType", it.name) }
startsThread?.let { put("startsThread", it) }
}.takeIf { it.isNotEmpty() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ data class MobileScreen(
*/
Invites,

/**
* The screen shown to share location.
*/
LocationSend,

/**
* The screen shown to view a shared location.
*/
LocationView,

/**
* The screen that displays the login flow (when the user already has an
* account).
Expand Down

0 comments on commit 99dfeb7

Please sign in to comment.