mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Analytics: Track some screen (#4715)
This commit is contained in:
parent
13b4a58eaf
commit
db3353feb5
1 changed files with 13 additions and 0 deletions
|
@ -19,6 +19,7 @@ package im.vector.app.features.home.room.detail
|
|||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.GravityCompat
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
|
@ -36,6 +37,8 @@ import im.vector.app.core.extensions.replaceFragment
|
|||
import im.vector.app.core.platform.ToolbarConfigurable
|
||||
import im.vector.app.core.platform.VectorBaseActivity
|
||||
import im.vector.app.databinding.ActivityRoomDetailBinding
|
||||
import im.vector.app.features.analytics.plan.Screen
|
||||
import im.vector.app.features.analytics.screen.ScreenEvent
|
||||
import im.vector.app.features.home.room.breadcrumbs.BreadcrumbsFragment
|
||||
import im.vector.app.features.home.room.detail.timeline.helper.VoiceMessagePlaybackTracker
|
||||
import im.vector.app.features.matrixto.MatrixToBottomSheet
|
||||
|
@ -161,6 +164,16 @@ class RoomDetailActivity :
|
|||
}
|
||||
|
||||
private val drawerListener = object : DrawerLayout.SimpleDrawerListener() {
|
||||
private var drawerScreenEvent: ScreenEvent? = null
|
||||
override fun onDrawerOpened(drawerView: View) {
|
||||
drawerScreenEvent = ScreenEvent(Screen.ScreenName.MobileBreadcrumbs)
|
||||
}
|
||||
|
||||
override fun onDrawerClosed(drawerView: View) {
|
||||
drawerScreenEvent?.send(analyticsTracker)
|
||||
drawerScreenEvent = null
|
||||
}
|
||||
|
||||
override fun onDrawerStateChanged(newState: Int) {
|
||||
hideKeyboard()
|
||||
|
||||
|
|
Loading…
Reference in a new issue