From 88ecfa367891a0a26dafb4948a2fc19d78c5cba3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 14 Feb 2022 16:40:11 +0100 Subject: [PATCH] Fix compilation issue, Screen has been renamed to MobileScreen Also manually delete WebScreen, which does not compile. Will have to fix that upstream. --- .../app/core/platform/VectorBaseActivity.kt | 4 +- .../VectorBaseBottomSheetDialogFragment.kt | 4 +- .../app/core/platform/VectorBaseFragment.kt | 4 +- .../app/features/analytics/plan/WebScreen.kt | 241 ------------------ .../features/analytics/screen/ScreenEvent.kt | 8 +- .../features/call/dialpad/DialPadFragment.kt | 4 +- .../createdirect/CreateDirectRoomActivity.kt | 4 +- .../vector/app/features/home/HomeActivity.kt | 6 +- .../app/features/home/HomeDrawerFragment.kt | 4 +- .../home/room/detail/RoomDetailActivity.kt | 4 +- .../home/room/detail/TimelineFragment.kt | 4 +- .../room/filtered/FilteredRoomsActivity.kt | 4 +- .../home/room/list/RoomListFragment.kt | 6 +- .../app/features/login/LoginActivity.kt | 6 +- .../login/LoginResetPasswordFragment.kt | 4 +- .../app/features/login/LoginSplashFragment.kt | 4 +- .../roomdirectory/RoomDirectoryActivity.kt | 4 +- .../createroom/CreateRoomActivity.kt | 4 +- .../picker/RoomDirectoryPickerFragment.kt | 4 +- .../RoomMemberProfileFragment.kt | 4 +- .../roomprofile/RoomProfileFragment.kt | 4 +- .../uploads/RoomUploadsFragment.kt | 4 +- .../settings/VectorSettingsBaseFragment.kt | 4 +- .../settings/VectorSettingsRootFragment.kt | 4 +- .../VectorSettingsSecurityPrivacyFragment.kt | 4 +- .../deactivation/DeactivateAccountFragment.kt | 4 +- ...gsDefaultNotificationPreferenceFragment.kt | 4 +- ...dMentionsNotificationPreferenceFragment.kt | 4 +- 28 files changed, 59 insertions(+), 300 deletions(-) delete mode 100644 vector/src/main/java/im/vector/app/features/analytics/plan/WebScreen.kt diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt index 8164df9c55..5767acd44b 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseActivity.kt @@ -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 : 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 diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseBottomSheetDialogFragment.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseBottomSheetDialogFragment.kt index 7e6a429274..869a12e871 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseBottomSheetDialogFragment.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseBottomSheetDialogFragment.kt @@ -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 : BottomShe * Analytics * ========================================================================================== */ - protected var analyticsScreenName: Screen.ScreenName? = null + protected var analyticsScreenName: MobileScreen.ScreenName? = null private var screenEvent: ScreenEvent? = null protected lateinit var analyticsTracker: AnalyticsTracker diff --git a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt index 8a1b9051cc..6bd62707f2 100644 --- a/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt +++ b/vector/src/main/java/im/vector/app/core/platform/VectorBaseFragment.kt @@ -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 : 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 diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/WebScreen.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/WebScreen.kt deleted file mode 100644 index b43d6d1b87..0000000000 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/WebScreen.kt +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2021 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package im.vector.app.features.analytics.plan - -import im.vector.app.features.analytics.itf.VectorAnalyticsEvent - -// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT -// https://github.com/matrix-org/matrix-analytics-events/ - -/** - * Triggered when the user changed screen on Element Web/Desktop - */ -data class WebScreen( - val $current_url: $current_url, - /** - * How long the screen took to load, if applicable. - */ - val durationMs: Int? = null, -) : VectorAnalyticsEvent { - - enum class $current_url { - /** - * Screen showing flow to trust this new device with cross-signing. - */ - CompleteSecurity, - - /** - * The screen shown to create a new (non-direct) room. - */ - CreateRoom, - - /** - * The confirmation screen shown before deactivating an account. - */ - DeactivateAccount, - - /** - * Screen showing flow to setup SSSS / cross-signing on this account. - */ - E2ESetup, - - /** - * The form for the forgot password use case - */ - ForgotPassword, - - /** - * Legacy: The screen that shows information about a specific group. - */ - Group, - - /** - * Home page. - */ - Home, - - /** - * Screen showing loading spinner. - */ - Loading, - - /** - * The screen that displays the login flow (when the user already has an - * account). - */ - Login, - - /** - * Legacy: The screen that shows all groups/communities you have joined. - */ - MyGroups, - - /** - * The screen that displays the registration flow (when the user wants - * to create an account) - */ - Register, - - /** - * The screen that displays the messages and events received in a room. - */ - Room, - - /** - * The screen shown when tapping the name of a room from the Room - * screen. - */ - RoomDetails, - - /** - * The screen that lists public rooms for you to discover. - */ - RoomDirectory, - - /** - * The screen that lists all the user's rooms and let them filter the - * rooms. - */ - RoomFilter, - - /** - * The screen that displays the list of members that are part of a room. - */ - RoomMembers, - - /** - * The notifications settings screen shown from the Room Details screen. - */ - RoomNotifications, - - /** - * The screen that allows you to search for messages/files in a specific - * room. - */ - RoomSearch, - - /** - * The settings screen shown from the Room Details screen. - */ - RoomSettings, - - /** - * The screen that allows you to see all of the files sent in a specific - * room. - */ - RoomUploads, - - /** - * Screen showing device has been soft logged out by the server. - */ - SoftLogout, - - /** - * Screen that displays the list of rooms and spaces of a space - */ - SpaceExploreRooms, - - /** - * The screen shown to create a new direct room. - */ - StartChat, - - /** - * A screen that shows information about a room member. - */ - User, - - /** - * Legacy: screen showing User Settings Flair Tab. - */ - UserSettingFlair, - - /** - * Screen showing User Settings Mjolnir (labs) Tab. - */ - UserSettingMjolnir, - - /** - * Screen showing User Settings Appearance Tab. - */ - UserSettingsAppearance, - - /** - * Screen showing User Settings General Tab. - */ - UserSettingsGeneral, - - /** - * Screen showing User Settings Help & About Tab. - */ - UserSettingsHelpAbout, - - /** - * Screen showing User Settings Ignored Users Tab. - */ - UserSettingsIgnoredUsers, - - /** - * Screen showing User Settings Keyboard Tab. - */ - UserSettingsKeyboard, - - /** - * Screen showing User Settings Labs Tab. - */ - UserSettingsLabs, - - /** - * Screen showing User Settings Notifications Tab. - */ - UserSettingsNotifications, - - /** - * Screen showing User Settings Preferences Tab. - */ - UserSettingsPreferences, - - /** - * Screen showing User Settings Security & Privacy Tab. - */ - UserSettingsSecurityPrivacy, - - /** - * Screen showing User Settings Sidebar Tab. - */ - UserSettingsSidebar, - - /** - * Screen showing User Settings Voice & Video Tab. - */ - UserSettingsVoiceVideo, - - /** - * The splash screen. - */ - Welcome, - } - - override fun getName() = "$pageview" - - override fun getProperties(): Map? { - return mutableMapOf().apply { - put("$current_url", $current_url.name) - durationMs?.let { put("durationMs", it) } - }.takeIf { it.isNotEmpty() } - } -} diff --git a/vector/src/main/java/im/vector/app/features/analytics/screen/ScreenEvent.kt b/vector/src/main/java/im/vector/app/features/analytics/screen/ScreenEvent.kt index 8e0513f25a..1ad4a1fa32 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/screen/ScreenEvent.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/screen/ScreenEvent.kt @@ -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() ) diff --git a/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadFragment.kt b/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadFragment.kt index 5fc866a4dd..b33ce25f55 100644 --- a/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadFragment.kt +++ b/vector/src/main/java/im/vector/app/features/call/dialpad/DialPadFragment.kt @@ -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() { diff --git a/vector/src/main/java/im/vector/app/features/createdirect/CreateDirectRoomActivity.kt b/vector/src/main/java/im/vector/app/features/createdirect/CreateDirectRoomActivity.kt index 2d93bab6a3..a6b34eda25 100644 --- a/vector/src/main/java/im/vector/app/features/createdirect/CreateDirectRoomActivity.kt +++ b/vector/src/main/java/im/vector/app/features/createdirect/CreateDirectRoomActivity.kt @@ -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) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index 6b6be63480..f6b32973a0 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -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) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt b/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt index 9af06ef801..1aee0257f4 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt @@ -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( diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt index ae24052aa2..f5bf086e96 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailActivity.kt @@ -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) { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index 92319fabdc..ff392eaf1b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -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)) diff --git a/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomsActivity.kt b/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomsActivity.kt index 0e16b4b0df..cf7c4a0e80 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomsActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/filtered/FilteredRoomsActivity.kt @@ -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() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - analyticsScreenName = Screen.ScreenName.RoomFilter + analyticsScreenName = MobileScreen.ScreenName.RoomFilter setupToolbar(views.filteredRoomsToolbar) .allowBack() if (isFirstCreation()) { diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt index b6481c9cbb..b023c26590 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/RoomListFragment.kt @@ -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 } } diff --git a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt index edc77d73f6..bf596fc6aa 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginActivity.kt @@ -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(), 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(), 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, diff --git a/vector/src/main/java/im/vector/app/features/login/LoginResetPasswordFragment.kt b/vector/src/main/java/im/vector/app/features/login/LoginResetPasswordFragment.kt index 0328d09427..d121245532 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginResetPasswordFragment.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginResetPasswordFragment.kt @@ -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(), 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()) { diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomActivity.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomActivity.kt index 339c819a65..e4c350b88e 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomActivity.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomActivity.kt @@ -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() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - analyticsScreenName = Screen.ScreenName.CreateRoom + analyticsScreenName = MobileScreen.ScreenName.CreateRoom sharedActionViewModel = viewModelProvider.get(RoomDirectorySharedActionViewModel::class.java) sharedActionViewModel .stream() diff --git a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerFragment.kt b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerFragment.kt index 48610dda7b..cb71f93a0e 100644 --- a/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomdirectory/picker/RoomDirectoryPickerFragment.kt @@ -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?) { diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index c68bfca973..fcebe9adbb 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -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?) { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt index 8acf53088d..251b99e318 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt @@ -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) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/RoomUploadsFragment.kt b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/RoomUploadsFragment.kt index 3c1a763072..a0adf42d5b 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/uploads/RoomUploadsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/uploads/RoomUploadsFragment.kt @@ -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?) { diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsBaseFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsBaseFragment.kt index 7cefd20269..4185fde663 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsBaseFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsBaseFragment.kt @@ -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 diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt index cd76efac58..51011e29a2 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsRootFragment.kt @@ -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() { diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index e4e287e83a..ef87d908ea 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -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 diff --git a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt index 867526c009..631c375e62 100644 --- a/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/account/deactivation/DeactivateAccountFragment.kt @@ -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