Skip to content

Commit

Permalink
Analytics: Track some screen (#4715)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Jan 19, 2022
1 parent 13b4a58 commit db3353f
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit db3353f

Please sign in to comment.