mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Merge pull request #6700 from vector-im/sync-analytics-plan
Sync analytics plan
This commit is contained in:
commit
d85a16482e
4 changed files with 108 additions and 2 deletions
|
@ -38,6 +38,7 @@ import im.vector.app.core.platform.VectorBaseActivity
|
|||
import im.vector.app.core.utils.deleteAllFiles
|
||||
import im.vector.app.databinding.ActivityMainBinding
|
||||
import im.vector.app.features.analytics.VectorAnalytics
|
||||
import im.vector.app.features.analytics.plan.ViewRoom
|
||||
import im.vector.app.features.home.HomeActivity
|
||||
import im.vector.app.features.home.ShortcutsHandler
|
||||
import im.vector.app.features.notifications.NotificationDrawerManager
|
||||
|
@ -186,8 +187,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
|||
} else if (intent.action == ACTION_ROOM_DETAILS_FROM_SHORTCUT) {
|
||||
val roomId = intent.getStringExtra(EXTRA_ROOM_ID)
|
||||
if (roomId?.isNotEmpty() == true) {
|
||||
// TODO Add a trigger Shortcut to the analytics.
|
||||
navigator.openRoom(this, roomId)
|
||||
navigator.openRoom(this, roomId, trigger = ViewRoom.Trigger.Shortcut)
|
||||
}
|
||||
finish()
|
||||
} else {
|
||||
|
|
|
@ -117,6 +117,12 @@ data class Interaction(
|
|||
*/
|
||||
WebLeftPanelExploreRoomsButton,
|
||||
|
||||
/**
|
||||
* User clicked on the avatar uploader in the profile settings of
|
||||
* Element Web/Desktop.
|
||||
*/
|
||||
WebProfileSettingsAvatarUploadButton,
|
||||
|
||||
/**
|
||||
* User interacted with pin to sidebar checkboxes in the quick settings
|
||||
* menu of Element Web/Desktop.
|
||||
|
@ -279,6 +285,18 @@ data class Interaction(
|
|||
*/
|
||||
WebRoomListRoomsSublistPlusMenuExploreRoomsItem,
|
||||
|
||||
/**
|
||||
* User clicked on the button to return to the user onboarding list in
|
||||
* the room list in Element Web/Desktop.
|
||||
*/
|
||||
WebRoomListUserOnboardingButton,
|
||||
|
||||
/**
|
||||
* User clicked on the button to close the user onboarding button in the
|
||||
* room list in Element Web/Desktop.
|
||||
*/
|
||||
WebRoomListUserOnboardingIgnoreButton,
|
||||
|
||||
/**
|
||||
* User interacted with leave action in the general tab of the room
|
||||
* settings dialog in Element Web/Desktop.
|
||||
|
@ -349,6 +367,36 @@ data class Interaction(
|
|||
* Web/Desktop.
|
||||
*/
|
||||
WebUserMenuThemeToggleButton,
|
||||
|
||||
/**
|
||||
* User clicked on the send DM CTA in the header of the new user
|
||||
* onboarding page in Element Web/Desktop.
|
||||
*/
|
||||
WebUserOnboardingHeaderSendDm,
|
||||
|
||||
/**
|
||||
* User clicked on the action of the download apps task on the new user
|
||||
* onboarding page in Element Web/Desktop.
|
||||
*/
|
||||
WebUserOnboardingTaskDownloadApps,
|
||||
|
||||
/**
|
||||
* User clicked on the action of the enable notifications task on the
|
||||
* new user onboarding page in Element Web/Desktop.
|
||||
*/
|
||||
WebUserOnboardingTaskEnableNotifications,
|
||||
|
||||
/**
|
||||
* User clicked on the action of the find people task on the new user
|
||||
* onboarding page in Element Web/Desktop.
|
||||
*/
|
||||
WebUserOnboardingTaskSendDm,
|
||||
|
||||
/**
|
||||
* User clicked on the action of the your profile task on the new user
|
||||
* onboarding page in Element Web/Desktop.
|
||||
*/
|
||||
WebUserOnboardingTaskSetupProfile,
|
||||
}
|
||||
|
||||
enum class InteractionType {
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* 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 changes a permission status.
|
||||
*/
|
||||
data class PermissionChanged(
|
||||
/**
|
||||
* Whether the permission has been granted by the user.
|
||||
*/
|
||||
val granted: Boolean,
|
||||
/**
|
||||
* The name of the permission.
|
||||
*/
|
||||
val permission: Permission,
|
||||
) : VectorAnalyticsEvent {
|
||||
|
||||
enum class Permission {
|
||||
/**
|
||||
* Permissions related to sending notifications have changed.
|
||||
*/
|
||||
Notification,
|
||||
}
|
||||
|
||||
override fun getName() = "PermissionChanged"
|
||||
|
||||
override fun getProperties(): Map<String, Any>? {
|
||||
return mutableMapOf<String, Any>().apply {
|
||||
put("granted", granted)
|
||||
put("permission", permission.name)
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
}
|
||||
}
|
|
@ -152,6 +152,11 @@ data class ViewRoom(
|
|||
*/
|
||||
RoomList,
|
||||
|
||||
/**
|
||||
* Room accessed via a shortcut.
|
||||
*/
|
||||
Shortcut,
|
||||
|
||||
/**
|
||||
* Room accessed via a slash command in Element Web/Desktop like /goto.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue