Merge pull request #5223 from vector-im/sync-analytics-plan

Sync analytics plan
This commit is contained in:
Benoit Marty 2022-02-17 16:49:03 +01:00 committed by GitHub
commit 555754b6e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 151 additions and 238 deletions

View file

@ -67,7 +67,7 @@ import im.vector.app.core.utils.toast
import im.vector.app.features.MainActivity
import im.vector.app.features.MainActivityArgs
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import im.vector.app.features.configuration.VectorConfiguration
import im.vector.app.features.consent.ConsentNotGivenHelper
@ -97,7 +97,7 @@ abstract class VectorBaseActivity<VB : ViewBinding> : AppCompatActivity(), Maver
* Analytics
* ========================================================================================== */
protected var analyticsScreenName: Screen.ScreenName? = null
protected var analyticsScreenName: MobileScreen.ScreenName? = null
private var screenEvent: ScreenEvent? = null
protected lateinit var analyticsTracker: AnalyticsTracker

View file

@ -38,7 +38,7 @@ import im.vector.app.core.extensions.singletonEntryPoint
import im.vector.app.core.extensions.toMvRxBundle
import im.vector.app.core.utils.DimensionConverter
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
@ -53,7 +53,7 @@ abstract class VectorBaseBottomSheetDialogFragment<VB : ViewBinding> : BottomShe
* Analytics
* ========================================================================================== */
protected var analyticsScreenName: Screen.ScreenName? = null
protected var analyticsScreenName: MobileScreen.ScreenName? = null
private var screenEvent: ScreenEvent? = null
protected lateinit var analyticsTracker: AnalyticsTracker

View file

@ -44,7 +44,7 @@ import im.vector.app.core.extensions.singletonEntryPoint
import im.vector.app.core.extensions.toMvRxBundle
import im.vector.app.core.utils.ToolbarConfig
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import im.vector.app.features.navigation.Navigator
import im.vector.lib.ui.styles.dialogs.MaterialProgressDialog
@ -58,7 +58,7 @@ abstract class VectorBaseFragment<VB : ViewBinding> : Fragment(), MavericksView
* Analytics
* ========================================================================================== */
protected var analyticsScreenName: Screen.ScreenName? = null
protected var analyticsScreenName: MobileScreen.ScreenName? = null
private var screenEvent: ScreenEvent? = null
protected lateinit var analyticsTracker: AnalyticsTracker

View file

@ -22,9 +22,9 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsScreen
// https://github.com/matrix-org/matrix-analytics-events/
/**
* Triggered when the user changed screen
* Triggered when the user changed screen on Element Android/iOS
*/
data class Screen(
data class MobileScreen(
/**
* How long the screen was displayed for in milliseconds.
*/
@ -33,6 +33,11 @@ data class Screen(
) : VectorAnalyticsScreen {
enum class ScreenName {
/**
* The screen that displays the user's breadcrumbs.
*/
Breadcrumbs,
/**
* The screen shown to create a new (non-direct) room.
*/
@ -43,6 +48,16 @@ data class Screen(
*/
DeactivateAccount,
/**
* The tab on mobile that displays the dialpad.
*/
Dialpad,
/**
* The Favourites tab on mobile that lists your favourite people/rooms.
*/
Favourites,
/**
* The form for the forgot password use case
*/
@ -54,11 +69,15 @@ data class Screen(
Group,
/**
* The Home tab on iOS | possibly the same on Android? | Home page on
* Web
* The Home tab on iOS | possibly the same on Android?
*/
Home,
/**
* The screen shown to share a link to download the app.
*/
InviteFriends,
/**
* The screen that displays the login flow (when the user already has an
* account).
@ -66,100 +85,14 @@ data class Screen(
Login,
/**
* The screen that displays the user's breadcrumbs.
* Legacy: The screen that shows all groups/communities you have joined.
*/
MobileBreadcrumbs,
/**
* The tab on mobile that displays the dialpad.
*/
MobileDialpad,
/**
* The Favourites tab on mobile that lists your favourite people/rooms.
*/
MobileFavourites,
/**
* The screen shown to share a link to download the app.
*/
MobileInviteFriends,
MyGroups,
/**
* The People tab on mobile that lists all the DM rooms you have joined.
*/
MobilePeople,
/**
* The Rooms tab on mobile that lists all the (non-direct) rooms you've
* joined.
*/
MobileRooms,
/**
* The Files tab shown in the global search screen on Mobile.
*/
MobileSearchFiles,
/**
* The Messages tab shown in the global search screen on Mobile.
*/
MobileSearchMessages,
/**
* The People tab shown in the global search screen on Mobile.
*/
MobileSearchPeople,
/**
* The Rooms tab shown in the global search screen on Mobile.
*/
MobileSearchRooms,
/**
* The global settings screen shown in the app.
*/
MobileSettings,
/**
* The settings screen to change the default notification options.
*/
MobileSettingsDefaultNotifications,
/**
* The settings screen to manage notification mentions and keywords.
*/
MobileSettingsMentionsAndKeywords,
/**
* The global security settings screen.
*/
MobileSettingsSecurity,
/**
* The sidebar shown on mobile with spaces, settings etc.
*/
MobileSidebar,
/**
* Screen that displays the list of members of a space
*/
MobileSpaceMembers,
/**
* The bottom sheet that list all space options
*/
MobileSpaceMenu,
/**
* The screen shown to select which room directory you'd like to use.
*/
MobileSwitchDirectory,
/**
* Legacy: The screen that shows all groups/communities you have joined.
*/
MyGroups,
People,
/**
* The screen that displays the registration flow (when the user wants
@ -216,107 +149,87 @@ data class Screen(
*/
RoomUploads,
/**
* The Rooms tab on mobile that lists all the (non-direct) rooms you've
* joined.
*/
Rooms,
/**
* The Files tab shown in the global search screen on Mobile.
*/
SearchFiles,
/**
* The Messages tab shown in the global search screen on Mobile.
*/
SearchMessages,
/**
* The People tab shown in the global search screen on Mobile.
*/
SearchPeople,
/**
* The Rooms tab shown in the global search screen on Mobile.
*/
SearchRooms,
/**
* The global settings screen shown in the app.
*/
Settings,
/**
* The settings screen to change the default notification options.
*/
SettingsDefaultNotifications,
/**
* The settings screen to manage notification mentions and keywords.
*/
SettingsMentionsAndKeywords,
/**
* The global security settings screen.
*/
SettingsSecurity,
/**
* The sidebar shown on mobile with spaces, settings etc.
*/
Sidebar,
/**
* Screen that displays the list of rooms and spaces of a space
*/
SpaceExploreRooms,
/**
* Screen that displays the list of members of a space
*/
SpaceMembers,
/**
* The bottom sheet that list all space options
*/
SpaceMenu,
/**
* The screen shown to create a new direct room.
*/
StartChat,
/**
* The screen shown to select which room directory you'd like to use.
*/
SwitchDirectory,
/**
* A screen that shows information about a room member.
*/
User,
/**
* Element Web showing flow to trust this new device with cross-signing.
*/
WebCompleteSecurity,
/**
* Element Web showing flow to setup SSSS / cross-signing on this
* account.
*/
WebE2ESetup,
/**
* Element Web loading spinner.
*/
WebLoading,
/**
* Element Web device has been soft logged out by the server.
*/
WebSoftLogout,
/**
* Legacy: Element Web User Settings Flair Tab.
*/
WebUserSettingFlair,
/**
* Element Web User Settings Mjolnir (labs) Tab.
*/
WebUserSettingMjolnir,
/**
* Element Web User Settings Appearance Tab.
*/
WebUserSettingsAppearance,
/**
* Element Web User Settings General Tab.
*/
WebUserSettingsGeneral,
/**
* Element Web User Settings Help & About Tab.
*/
WebUserSettingsHelpAbout,
/**
* Element Web User Settings Ignored Users Tab.
*/
WebUserSettingsIgnoredUsers,
/**
* Element Web User Settings Keyboard Tab.
*/
WebUserSettingsKeyboard,
/**
* Element Web User Settings Labs Tab.
*/
WebUserSettingsLabs,
/**
* Element Web User Settings Notifications Tab.
*/
WebUserSettingsNotifications,
/**
* Element Web User Settings Preferences Tab.
*/
WebUserSettingsPreferences,
/**
* Element Web User Settings Security & Privacy Tab.
*/
WebUserSettingsSecurityPrivacy,
/**
* Element Web User Settings Sidebar Tab.
*/
WebUserSettingsSidebar,
/**
* Element Web User Settings Voice & Video Tab.
*/
WebUserSettingsVoiceVideo,
/**
* The splash screen.
*/

View file

@ -18,13 +18,13 @@ package im.vector.app.features.analytics.screen
import android.os.SystemClock
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import timber.log.Timber
/**
* Track a screen display. Unique usage.
*/
class ScreenEvent(val screenName: Screen.ScreenName) {
class ScreenEvent(val screenName: MobileScreen.ScreenName) {
private val startTime = SystemClock.elapsedRealtime()
// Protection to avoid multiple sending
@ -34,14 +34,14 @@ class ScreenEvent(val screenName: Screen.ScreenName) {
* @param screenNameOverride can be used to override the screen name passed in constructor parameter
*/
fun send(analyticsTracker: AnalyticsTracker,
screenNameOverride: Screen.ScreenName? = null) {
screenNameOverride: MobileScreen.ScreenName? = null) {
if (isSent) {
Timber.w("Event $screenName Already sent!")
return
}
isSent = true
analyticsTracker.screen(
Screen(
MobileScreen(
screenName = screenNameOverride ?: screenName,
durationMs = (SystemClock.elapsedRealtime() - startTime).toInt()
)

View file

@ -40,7 +40,7 @@ import com.android.dialer.dialpadview.DigitsEditText
import im.vector.app.R
import im.vector.app.core.extensions.singletonEntryPoint
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import im.vector.app.features.themes.ThemeUtils
@ -69,7 +69,7 @@ class DialPadFragment : Fragment(), TextWatcher {
private var screenEvent: ScreenEvent? = null
override fun onResume() {
super.onResume()
screenEvent = ScreenEvent(Screen.ScreenName.MobileDialpad)
screenEvent = ScreenEvent(MobileScreen.ScreenName.Dialpad)
}
override fun onPause() {

View file

@ -43,7 +43,7 @@ import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO
import im.vector.app.core.utils.checkPermissions
import im.vector.app.core.utils.onPermissionDeniedSnackbar
import im.vector.app.core.utils.registerForPermissionsResult
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.contactsbook.ContactsBookFragment
import im.vector.app.features.qrcode.QrCodeScannerEvents
import im.vector.app.features.qrcode.QrCodeScannerFragment
@ -71,7 +71,7 @@ class CreateDirectRoomActivity : SimpleFragmentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.StartChat
analyticsScreenName = MobileScreen.ScreenName.StartChat
views.toolbar.visibility = View.GONE
sharedActionViewModel = viewModelProvider.get(UserListSharedActionViewModel::class.java)

View file

@ -48,7 +48,7 @@ import im.vector.app.databinding.ActivityHomeBinding
import im.vector.app.features.MainActivity
import im.vector.app.features.MainActivityArgs
import im.vector.app.features.analytics.accountdata.AnalyticsAccountDataViewModel
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import im.vector.app.features.disclaimer.showDisclaimerDialog
import im.vector.app.features.matrixto.MatrixToBottomSheet
@ -165,7 +165,7 @@ class HomeActivity :
private val drawerListener = object : DrawerLayout.SimpleDrawerListener() {
private var drawerScreenEvent: ScreenEvent? = null
override fun onDrawerOpened(drawerView: View) {
drawerScreenEvent = ScreenEvent(Screen.ScreenName.MobileSidebar)
drawerScreenEvent = ScreenEvent(MobileScreen.ScreenName.Sidebar)
}
override fun onDrawerClosed(drawerView: View) {
@ -184,7 +184,7 @@ class HomeActivity :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.Home
analyticsScreenName = MobileScreen.ScreenName.Home
supportFragmentManager.registerFragmentLifecycleCallbacks(fragmentLifecycleCallbacks, false)
FcmHelper.ensureFcmTokenIsRetrieved(this, pushManager, vectorPreferences.areNotificationEnabledForDevice())
sharedActionViewModel = viewModelProvider.get(HomeSharedActionViewModel::class.java)

View file

@ -30,7 +30,7 @@ import im.vector.app.core.extensions.replaceChildFragment
import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.core.utils.startSharePlainTextIntent
import im.vector.app.databinding.FragmentHomeDrawerBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.settings.VectorPreferences
import im.vector.app.features.settings.VectorSettingsActivity
import im.vector.app.features.spaces.SpaceListFragment
@ -98,7 +98,7 @@ class HomeDrawerFragment @Inject constructor(
views.homeDrawerInviteFriendButton.debouncedClicks {
session.permalinkService().createPermalink(sharedActionViewModel.session.myUserId)?.let { permalink ->
analyticsTracker.screen(Screen(screenName = Screen.ScreenName.MobileInviteFriends))
analyticsTracker.screen(MobileScreen(screenName = MobileScreen.ScreenName.InviteFriends))
val text = getString(R.string.invite_friends_text, permalink)
startSharePlainTextIntent(

View file

@ -35,7 +35,7 @@ import im.vector.app.core.extensions.keepScreenOn
import im.vector.app.core.extensions.replaceFragment
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.plan.MobileScreen
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.arguments.TimelineArgs
@ -160,7 +160,7 @@ class RoomDetailActivity :
private val drawerListener = object : DrawerLayout.SimpleDrawerListener() {
private var drawerScreenEvent: ScreenEvent? = null
override fun onDrawerOpened(drawerView: View) {
drawerScreenEvent = ScreenEvent(Screen.ScreenName.MobileBreadcrumbs)
drawerScreenEvent = ScreenEvent(MobileScreen.ScreenName.Breadcrumbs)
}
override fun onDrawerClosed(drawerView: View) {

View file

@ -120,7 +120,7 @@ import im.vector.app.core.utils.toast
import im.vector.app.databinding.DialogReportContentBinding
import im.vector.app.databinding.FragmentTimelineBinding
import im.vector.app.features.analytics.plan.Composer
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.attachments.AttachmentTypeSelectorView
import im.vector.app.features.attachments.AttachmentsHelper
import im.vector.app.features.attachments.ContactAttachment
@ -342,7 +342,7 @@ class TimelineFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.Room
analyticsScreenName = MobileScreen.ScreenName.Room
setFragmentResultListener(MigrateRoomBottomSheet.REQUEST_KEY) { _, bundle ->
bundle.getString(MigrateRoomBottomSheet.BUNDLE_KEY_REPLACEMENT_ROOM)?.let { replacementRoomId ->
timelineViewModel.handle(RoomDetailAction.RoomUpgradeSuccess(replacementRoomId))

View file

@ -24,7 +24,7 @@ import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.replaceFragment
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityFilteredRoomsBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.RoomListDisplayMode
import im.vector.app.features.home.room.list.RoomListFragment
import im.vector.app.features.home.room.list.RoomListParams
@ -43,7 +43,7 @@ class FilteredRoomsActivity : VectorBaseActivity<ActivityFilteredRoomsBinding>()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.RoomFilter
analyticsScreenName = MobileScreen.ScreenName.RoomFilter
setupToolbar(views.filteredRoomsToolbar)
.allowBack()
if (isFirstCreation()) {

View file

@ -42,7 +42,7 @@ import im.vector.app.core.platform.StateView
import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.core.resources.UserPreferencesProvider
import im.vector.app.databinding.FragmentRoomListBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.RoomListDisplayMode
import im.vector.app.features.home.room.filtered.FilteredRoomFooterItem
import im.vector.app.features.home.room.list.actions.RoomListQuickActionsBottomSheet
@ -104,8 +104,8 @@ class RoomListFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = when (roomListParams.displayMode) {
RoomListDisplayMode.PEOPLE -> Screen.ScreenName.MobilePeople
RoomListDisplayMode.ROOMS -> Screen.ScreenName.MobileRooms
RoomListDisplayMode.PEOPLE -> MobileScreen.ScreenName.People
RoomListDisplayMode.ROOMS -> MobileScreen.ScreenName.Rooms
else -> null
}
}

View file

@ -38,7 +38,7 @@ import im.vector.app.core.extensions.addFragmentToBackstack
import im.vector.app.core.extensions.exhaustive
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivityLoginBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.HomeActivity
import im.vector.app.features.login.terms.LoginTermsFragment
import im.vector.app.features.login.terms.LoginTermsFragmentArgument
@ -81,7 +81,7 @@ open class LoginActivity : VectorBaseActivity<ActivityLoginBinding>(), UnlockedA
override fun getCoordinatorLayout() = views.coordinatorLayout
override fun initUiAndData() {
analyticsScreenName = Screen.ScreenName.Login
analyticsScreenName = MobileScreen.ScreenName.Login
if (isFirstCreation()) {
addFirstFragment()
@ -203,7 +203,7 @@ open class LoginActivity : VectorBaseActivity<ActivityLoginBinding>(), UnlockedA
if (loginViewState.isUserLogged()) {
if (loginViewState.signMode == SignMode.SignUp) {
// change the screen name
analyticsScreenName = Screen.ScreenName.Register
analyticsScreenName = MobileScreen.ScreenName.Register
}
val intent = HomeActivity.newIntent(
this,

View file

@ -31,7 +31,7 @@ import im.vector.app.core.extensions.hidePassword
import im.vector.app.core.extensions.isEmail
import im.vector.app.core.extensions.toReducedUrl
import im.vector.app.databinding.FragmentLoginResetPasswordBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
@ -48,7 +48,7 @@ class LoginResetPasswordFragment @Inject constructor() : AbstractLoginFragment<F
private var showWarning = true
override fun onCreate(savedInstanceState: Bundle?) {
analyticsScreenName = Screen.ScreenName.ForgotPassword
analyticsScreenName = MobileScreen.ScreenName.ForgotPassword
super.onCreate(savedInstanceState)
}

View file

@ -26,7 +26,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
import im.vector.app.BuildConfig
import im.vector.app.R
import im.vector.app.databinding.FragmentLoginSplashBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.settings.VectorPreferences
import org.matrix.android.sdk.api.failure.Failure
import java.net.UnknownHostException
@ -44,7 +44,7 @@ class LoginSplashFragment @Inject constructor(
}
override fun onCreate(savedInstanceState: Bundle?) {
analyticsScreenName = Screen.ScreenName.Welcome
analyticsScreenName = MobileScreen.ScreenName.Welcome
super.onCreate(savedInstanceState)
}

View file

@ -28,7 +28,7 @@ import im.vector.app.core.extensions.addFragmentToBackstack
import im.vector.app.core.extensions.popBackstack
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivitySimpleBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.matrixto.MatrixToBottomSheet
import im.vector.app.features.navigation.Navigator
import im.vector.app.features.roomdirectory.createroom.CreateRoomArgs
@ -51,7 +51,7 @@ class RoomDirectoryActivity : VectorBaseActivity<ActivitySimpleBinding>(), Matri
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.RoomDirectory
analyticsScreenName = MobileScreen.ScreenName.RoomDirectory
sharedActionViewModel = viewModelProvider.get(RoomDirectorySharedActionViewModel::class.java)
if (isFirstCreation()) {

View file

@ -26,7 +26,7 @@ import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.extensions.addFragment
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.databinding.ActivitySimpleBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.roomdirectory.RoomDirectorySharedAction
import im.vector.app.features.roomdirectory.RoomDirectorySharedActionViewModel
import kotlinx.coroutines.flow.launchIn
@ -57,7 +57,7 @@ class CreateRoomActivity : VectorBaseActivity<ActivitySimpleBinding>() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.CreateRoom
analyticsScreenName = MobileScreen.ScreenName.CreateRoom
sharedActionViewModel = viewModelProvider.get(RoomDirectorySharedActionViewModel::class.java)
sharedActionViewModel
.stream()

View file

@ -29,7 +29,7 @@ import im.vector.app.core.extensions.configureWith
import im.vector.app.core.platform.OnBackPressed
import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.databinding.FragmentRoomDirectoryPickerBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.roomdirectory.RoomDirectoryAction
import im.vector.app.features.roomdirectory.RoomDirectoryData
import im.vector.app.features.roomdirectory.RoomDirectoryServer
@ -54,7 +54,7 @@ class RoomDirectoryPickerFragment @Inject constructor(private val roomDirectoryP
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.MobileSwitchDirectory
analyticsScreenName = MobileScreen.ScreenName.SwitchDirectory
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -47,7 +47,7 @@ import im.vector.app.databinding.DialogBaseEditTextBinding
import im.vector.app.databinding.DialogShareQrCodeBinding
import im.vector.app.databinding.FragmentMatrixProfileBinding
import im.vector.app.databinding.ViewStubRoomMemberProfileHeaderBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.crypto.verification.VerificationBottomSheet
import im.vector.app.features.displayname.getBestName
import im.vector.app.features.home.AvatarRenderer
@ -91,7 +91,7 @@ class RoomMemberProfileFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.User
analyticsScreenName = MobileScreen.ScreenName.User
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -44,7 +44,7 @@ import im.vector.app.core.utils.copyToClipboard
import im.vector.app.core.utils.startSharePlainTextIntent
import im.vector.app.databinding.FragmentMatrixProfileBinding
import im.vector.app.databinding.ViewStubRoomProfileHeaderBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.home.room.detail.RoomDetailPendingAction
import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore
@ -89,7 +89,7 @@ class RoomProfileFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.RoomSettings
analyticsScreenName = MobileScreen.ScreenName.RoomSettings
setFragmentResultListener(MigrateRoomBottomSheet.REQUEST_KEY) { _, bundle ->
bundle.getString(MigrateRoomBottomSheet.BUNDLE_KEY_REPLACEMENT_ROOM)?.let { replacementRoomId ->
roomDetailPendingActionStore.data = RoomDetailPendingAction.OpenRoom(replacementRoomId, closeCurrentRoom = true)

View file

@ -34,7 +34,7 @@ import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.core.utils.saveMedia
import im.vector.app.core.utils.shareMedia
import im.vector.app.databinding.FragmentRoomUploadsBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.home.AvatarRenderer
import im.vector.app.features.notifications.NotificationUtils
import im.vector.app.features.roomprofile.RoomProfileArgs
@ -57,7 +57,7 @@ class RoomUploadsFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.RoomUploads
analyticsScreenName = MobileScreen.ScreenName.RoomUploads
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View file

@ -30,7 +30,7 @@ import im.vector.app.core.extensions.singletonEntryPoint
import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.toast
import im.vector.app.features.analytics.AnalyticsTracker
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.screen.ScreenEvent
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
@ -43,7 +43,7 @@ abstract class VectorSettingsBaseFragment : PreferenceFragmentCompat(), Maverick
* Analytics
* ========================================================================================== */
protected var analyticsScreenName: Screen.ScreenName? = null
protected var analyticsScreenName: MobileScreen.ScreenName? = null
private var screenEvent: ScreenEvent? = null
protected lateinit var analyticsTracker: AnalyticsTracker

View file

@ -19,7 +19,7 @@ package im.vector.app.features.settings
import android.os.Bundle
import im.vector.app.R
import im.vector.app.core.preference.VectorPreference
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import javax.inject.Inject
class VectorSettingsRootFragment @Inject constructor() : VectorSettingsBaseFragment() {
@ -29,7 +29,7 @@ class VectorSettingsRootFragment @Inject constructor() : VectorSettingsBaseFragm
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.MobileSettings
analyticsScreenName = MobileScreen.ScreenName.Settings
}
override fun bindPref() {

View file

@ -51,7 +51,7 @@ import im.vector.app.core.utils.copyToClipboard
import im.vector.app.core.utils.openFileSelection
import im.vector.app.core.utils.toast
import im.vector.app.databinding.DialogImportE2eKeysBinding
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.analytics.ui.consent.AnalyticsConsentViewActions
import im.vector.app.features.analytics.ui.consent.AnalyticsConsentViewModel
import im.vector.app.features.analytics.ui.consent.AnalyticsConsentViewState
@ -94,7 +94,7 @@ class VectorSettingsSecurityPrivacyFragment @Inject constructor(
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.MobileSettingsSecurity
analyticsScreenName = MobileScreen.ScreenName.SettingsSecurity
}
// cryptography

View file

@ -31,7 +31,7 @@ import im.vector.app.core.platform.VectorBaseFragment
import im.vector.app.databinding.FragmentDeactivateAccountBinding
import im.vector.app.features.MainActivity
import im.vector.app.features.MainActivityArgs
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import im.vector.app.features.auth.ReAuthActivity
import im.vector.app.features.settings.VectorSettingsActivity
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
@ -66,7 +66,7 @@ class DeactivateAccountFragment @Inject constructor() : VectorBaseFragment<Fragm
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.DeactivateAccount
analyticsScreenName = MobileScreen.ScreenName.DeactivateAccount
}
override fun onResume() {

View file

@ -19,7 +19,7 @@ package im.vector.app.features.settings.notifications
import android.os.Bundle
import im.vector.app.R
import im.vector.app.core.preference.VectorPreferenceCategory
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import org.matrix.android.sdk.api.pushrules.RuleIds
class VectorSettingsDefaultNotificationPreferenceFragment :
@ -38,7 +38,7 @@ class VectorSettingsDefaultNotificationPreferenceFragment :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.MobileSettingsDefaultNotifications
analyticsScreenName = MobileScreen.ScreenName.SettingsDefaultNotifications
}
override fun bindPref() {

View file

@ -25,7 +25,7 @@ import im.vector.app.core.preference.KeywordPreference
import im.vector.app.core.preference.VectorCheckboxPreference
import im.vector.app.core.preference.VectorPreference
import im.vector.app.core.preference.VectorPreferenceCategory
import im.vector.app.features.analytics.plan.Screen
import im.vector.app.features.analytics.plan.MobileScreen
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -45,7 +45,7 @@ class VectorSettingsKeywordAndMentionsNotificationPreferenceFragment :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
analyticsScreenName = Screen.ScreenName.MobileSettingsMentionsAndKeywords
analyticsScreenName = MobileScreen.ScreenName.SettingsMentionsAndKeywords
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {