Commit b0726934 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Changes the message actions menu order and add some analytics

parent 6242a5a4
...@@ -80,4 +80,58 @@ interface Analytics { ...@@ -80,4 +80,58 @@ interface Analytics {
*/ */
fun logVideoConference(event: SubscriptionTypeEvent, serverUrl: String) {} fun logVideoConference(event: SubscriptionTypeEvent, serverUrl: String) {}
/**
* Logs the add reaction message action.
*/
fun logMessageActionAddReaction() {}
/**
* Logs the replay message action.
*/
fun logMessageActionReply() {}
/**
* Logs the quote message action.
*/
fun logMessageActionQuote() {}
/**
* Logs the permalink message action.
*/
fun logMessageActionPermalink() {}
/**
* Logs the copy message action.
*/
fun logMessageActionCopy() {}
/**
* Logs the edit message action.
*/
fun logMessageActionEdit() {}
/**
* Logs the info message action.
*/
fun logMessageActionInfo() {}
/**
* Logs the star message action.
*/
fun logMessageActionStar() {}
/**
* Logs the pin message action.
*/
fun logMessageActionPin() {}
/**
* Logs the report message action.
*/
fun logMessageActionReport() {}
/**
* Logs the delete message action.
*/
fun logMessageActionDelete() {}
} }
...@@ -83,5 +83,69 @@ class AnalyticsManager @Inject constructor( ...@@ -83,5 +83,69 @@ class AnalyticsManager @Inject constructor(
} }
} }
fun logMessageActionAddReaction() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionAddReaction() }
}
}
fun logMessageActionReply() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionReply() }
}
}
fun logMessageActionQuote() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionQuote() }
}
}
fun logMessageActionPermalink() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionPermalink() }
}
}
fun logMessageActionCopy() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionCopy() }
}
}
fun logMessageActionEdit() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionEdit() }
}
}
fun logMessageActionInfo() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionInfo() }
}
}
fun logMessageActionStar() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionStar() }
}
}
fun logMessageActionPin() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionPin() }
}
}
fun logMessageActionReport() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionReport() }
}
}
fun logMessageActionDelete() {
if (analyticsTrackingInteractor.get()) {
analytics.forEach { it.logMessageActionDelete() }
}
}
} }
...@@ -92,14 +92,14 @@ abstract class BaseViewHolder<T : BaseUiModel<*>>( ...@@ -92,14 +92,14 @@ abstract class BaseViewHolder<T : BaseUiModel<*>>(
data?.let { vm -> data?.let { vm ->
vm.message.let { vm.message.let {
val menuItems = view.context.inflate(R.menu.message_actions).toList() val menuItems = view.context.inflate(R.menu.message_actions).toList()
menuItems.find { it.itemId == R.id.action_message_unpin }?.apply { menuItems.find { it.itemId == R.id.action_unpin }?.apply {
setTitle(if (it.pinned) R.string.action_msg_unpin else R.string.action_msg_pin) setTitle(if (it.pinned) R.string.action_unpin else R.string.action_pin)
isChecked = it.pinned isChecked = it.pinned
} }
menuItems.find { it.itemId == R.id.action_message_star }?.apply { menuItems.find { it.itemId == R.id.action_star }?.apply {
val isStarred = it.starred?.isNotEmpty() ?: false val isStarred = it.starred?.isNotEmpty() ?: false
setTitle(if (isStarred) R.string.action_msg_unstar else R.string.action_msg_star) setTitle(if (isStarred) R.string.action_unstar else R.string.action_star)
isChecked = isStarred isChecked = isStarred
} }
view.context?.let { view.context?.let {
......
...@@ -5,6 +5,7 @@ import android.view.View ...@@ -5,6 +5,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.R import chat.rocket.android.R
import chat.rocket.android.analytics.AnalyticsManager
import chat.rocket.android.chatroom.presentation.ChatRoomNavigator import chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import chat.rocket.android.chatroom.uimodel.AttachmentUiModel import chat.rocket.android.chatroom.uimodel.AttachmentUiModel
import chat.rocket.android.chatroom.uimodel.BaseUiModel import chat.rocket.android.chatroom.uimodel.BaseUiModel
...@@ -29,7 +30,8 @@ class ChatRoomAdapter( ...@@ -29,7 +30,8 @@ class ChatRoomAdapter(
private val actionSelectListener: OnActionSelected? = null, private val actionSelectListener: OnActionSelected? = null,
private val enableActions: Boolean = true, private val enableActions: Boolean = true,
private val reactionListener: EmojiReactionListener? = null, private val reactionListener: EmojiReactionListener? = null,
private val navigator: ChatRoomNavigator? = null private val navigator: ChatRoomNavigator? = null,
private val analyticsManager: AnalyticsManager? = null
) : RecyclerView.Adapter<BaseViewHolder<*>>() { ) : RecyclerView.Adapter<BaseViewHolder<*>>() {
private val dataSet = ArrayList<BaseUiModel<*>>() private val dataSet = ArrayList<BaseUiModel<*>>()
...@@ -239,47 +241,63 @@ class ChatRoomAdapter( ...@@ -239,47 +241,63 @@ class ChatRoomAdapter(
override fun isActionsEnabled(): Boolean = enableActions override fun isActionsEnabled(): Boolean = enableActions
override fun onActionSelected(item: MenuItem, message: Message) { override fun onActionSelected(item: MenuItem, message: Message) {
message.apply { if (analyticsManager != null && roomName != null && roomType != null && actionSelectListener != null) {
when (item.itemId) { with(message) {
R.id.action_message_info -> { when (item.itemId) {
actionSelectListener?.showMessageInfo(id) R.id.action_info -> {
} actionSelectListener.showMessageInfo(id)
R.id.action_message_reply -> { analyticsManager.logMessageActionInfo()
if (roomName != null && roomType != null) {
actionSelectListener?.citeMessage(roomName, roomType, id, true)
} }
}
R.id.action_message_quote -> { R.id.action_reply -> {
if (roomName != null && roomType != null) { actionSelectListener.citeMessage(roomName, roomType, id, true)
actionSelectListener?.citeMessage(roomName, roomType, id, false) analyticsManager.logMessageActionReply()
}
R.id.action_quote -> {
actionSelectListener.citeMessage(roomName, roomType, id, false)
analyticsManager.logMessageActionQuote()
}
R.id.action_copy -> {
actionSelectListener.copyMessage(id)
analyticsManager.logMessageActionCopy()
}
R.id.action_edit -> {
actionSelectListener.editMessage(roomId, id, this.message)
analyticsManager.logMessageActionEdit()
}
R.id.action_star -> {
actionSelectListener.toggleStar(id, !item.isChecked)
analyticsManager.logMessageActionStar()
}
R.id.action_pin -> {
actionSelectListener.togglePin(id, !item.isChecked)
analyticsManager.logMessageActionPin()
}
R.id.action_delete -> {
actionSelectListener.deleteMessage(roomId, id)
analyticsManager.logMessageActionDelete()
}
R.id.action_add_reaction -> {
actionSelectListener.showReactions(id)
analyticsManager.logMessageActionAddReaction()
}
R.id.action_permalink -> {
actionSelectListener.copyPermalink(id)
analyticsManager.logMessageActionPermalink()
}
R.id.action_report -> {
actionSelectListener.reportMessage(id)
analyticsManager.logMessageActionReport()
} }
}
R.id.action_message_copy -> {
actionSelectListener?.copyMessage(id)
}
R.id.action_message_edit -> {
actionSelectListener?.editMessage(roomId, id, message.message)
}
R.id.action_message_star -> {
actionSelectListener?.toggleStar(id, !item.isChecked)
}
R.id.action_message_unpin -> {
actionSelectListener?.togglePin(id, !item.isChecked)
}
R.id.action_message_delete -> {
actionSelectListener?.deleteMessage(roomId, id)
}
R.id.action_menu_msg_react -> {
actionSelectListener?.showReactions(id)
}
R.id.action_message_permalink -> {
actionSelectListener?.copyPermalink(id)
}
R.id.action_message_report -> {
actionSelectListener?.reportMessage(id)
}
else -> {
TODO("Not implemented")
} }
} }
} }
......
...@@ -284,12 +284,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -284,12 +284,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
?: requireNotNull(arguments) { "no arguments supplied when the fragment was instantiated" } ?: requireNotNull(arguments) { "no arguments supplied when the fragment was instantiated" }
adapter = ChatRoomAdapter( adapter = ChatRoomAdapter(
chatRoomId, roomId = chatRoomId,
chatRoomType, roomType = chatRoomType,
chatRoomName, roomName = chatRoomName,
this, actionSelectListener = this,
reactionListener = this, reactionListener = this,
navigator = navigator navigator = navigator,
analyticsManager = analyticsManager
) )
} }
......
...@@ -204,7 +204,7 @@ class UiModelMapper @Inject constructor( ...@@ -204,7 +204,7 @@ class UiModelMapper @Inject constructor(
private fun mapVisibleActions(viewModel: BaseUiModel<*>) { private fun mapVisibleActions(viewModel: BaseUiModel<*>) {
if (!settings.messageReadReceiptStoreUsers()) { if (!settings.messageReadReceiptStoreUsers()) {
viewModel.menuItemsToHide.add(R.id.action_message_info) viewModel.menuItemsToHide.add(R.id.action_info)
} }
} }
......
...@@ -2,60 +2,57 @@ ...@@ -2,60 +2,57 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item <item
android:id="@+id/action_message_info" android:id="@+id/action_add_reaction"
android:icon="@drawable/ic_action_message_info_outline_24dp"
android:title="@string/action_msg_info" />
<item
android:id="@+id/action_message_reply"
android:icon="@drawable/ic_action_message_reply_24dp"
android:title="@string/action_msg_reply" />
<item
android:id="@+id/action_message_edit"
android:icon="@drawable/ic_action_message_edit_24dp"
android:title="@string/action_msg_edit" />
<item
android:id="@+id/action_menu_msg_react"
android:icon="@drawable/ic_add_reaction" android:icon="@drawable/ic_add_reaction"
android:title="@string/action_msg_add_reaction" /> android:title="@string/action_msg_add_reaction" />
<item <item
android:id="@+id/action_message_permalink" android:id="@+id/action_reply"
android:icon="@drawable/ic_action_message_link_24dp" android:icon="@drawable/ic_action_message_reply_24dp"
android:title="@string/action_msg_copy_permalink" /> android:title="@string/action_msg_reply" />
<item <item
android:id="@+id/action_message_quote" android:id="@+id/action_quote"
android:icon="@drawable/ic_action_message_quote_24dp" android:icon="@drawable/ic_action_message_quote_24dp"
android:title="@string/action_msg_quote" /> android:title="@string/action_msg_quote" />
<item <item
android:id="@+id/action_message_copy" android:id="@+id/action_permalink"
android:icon="@drawable/ic_action_message_link_24dp"
android:title="@string/action_msg_permalink" />
<item
android:id="@+id/action_copy"
android:icon="@drawable/ic_action_message_copy_24dp" android:icon="@drawable/ic_action_message_copy_24dp"
android:title="@string/action_msg_copy" /> android:title="@string/action_msg_copy" />
<!--<item--> <item
<!--android:id="@+id/action_menu_msg_share"--> android:id="@+id/action_edit"
<!--andrtextIconicon="@drawable/ic_share_black_24px"--> android:icon="@drawable/ic_action_message_edit_24dp"
<!--android:title="@string/action_msg_share" />--> android:title="@string/action_msg_edit" />
<item
android:id="@+id/action_info"
android:icon="@drawable/ic_action_message_info_outline_24dp"
android:title="@string/action_info" />
<item <item
android:id="@+id/action_message_star" android:id="@+id/action_star"
android:icon="@drawable/ic_action_message_star_24dp" android:icon="@drawable/ic_action_message_star_24dp"
android:title="@string/action_msg_star" /> android:title="@string/action_star" />
<item <item
android:id="@+id/action_message_unpin" android:id="@+id/action_pin"
android:icon="@drawable/ic_action_message_pin_24dp" android:icon="@drawable/ic_action_message_pin_24dp"
android:title="@string/action_msg_pin" /> android:title="@string/action_pin" />
<item <item
android:id="@+id/action_message_report" android:id="@+id/action_report"
android:icon="@drawable/ic_action_message_report_24dp" android:icon="@drawable/ic_action_message_report_24dp"
android:title="@string/action_msg_report" /> android:title="@string/action_msg_report" />
<item <item
android:id="@+id/action_message_delete" android:id="@+id/action_delete"
android:icon="@drawable/ic_action_message_delete_24dp" android:icon="@drawable/ic_action_message_delete_24dp"
android:title="@string/action_msg_delete" /> android:title="@string/action_msg_delete" />
</menu> </menu>
\ No newline at end of file
...@@ -225,19 +225,19 @@ ...@@ -225,19 +225,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Antworten</string> <string name="action_msg_reply">Antworten</string>
<string name="action_msg_info">Nachrichten Info</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Bearbeiten</string> <string name="action_msg_edit">Bearbeiten</string>
<string name="action_msg_copy">Kopieren</string> <string name="action_msg_copy">Kopieren</string>
<string name="action_msg_quote">Zitieren</string> <string name="action_msg_quote">Zitieren</string>
<string name="action_msg_delete">Löschen</string> <string name="action_msg_delete">Löschen</string>
<string name="action_msg_pin">Nachricht anheften</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Nachricht nicht mehr anheften</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">Nachricht favorisieren</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Nachricht nicht mehr favorisieren</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Teilen</string> <string name="action_msg_share">Teilen</string>
<string name="action_title_editing">Nachricht bearbeiten</string> <string name="action_title_editing">Nachricht bearbeiten</string>
<string name="action_msg_add_reaction">Reaktion hinzufügen</string> <string name="action_msg_add_reaction">Reaktion hinzufügen</string>
<string name="action_msg_copy_permalink">Permalink kopieren</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">Bericht</string> <string name="action_msg_report">Bericht</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -214,19 +214,19 @@ ...@@ -214,19 +214,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Respuesta</string> <string name="action_msg_reply">Respuesta</string>
<string name="action_msg_info">Información del mensaje</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Editar</string> <string name="action_msg_edit">Editar</string>
<string name="action_msg_copy">Copiar</string> <string name="action_msg_copy">Copiar</string>
<string name="action_msg_quote">Citar</string> <string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Borrar</string> <string name="action_msg_delete">Borrar</string>
<string name="action_msg_pin">Fijar mensaje</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Soltar mensaje</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">Star mensaje</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Unstar mensaje</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Compartir</string> <string name="action_msg_share">Compartir</string>
<string name="action_title_editing">Edición de mensaje</string> <string name="action_title_editing">Edición de mensaje</string>
<string name="action_msg_add_reaction">Añadir una reacción</string> <string name="action_msg_add_reaction">Añadir una reacción</string>
<string name="action_msg_copy_permalink">Copiar permalink</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<!-- TODO - Add proper translation --> <!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string> <string name="action_msg_report">Report</string>
......
...@@ -219,19 +219,19 @@ ...@@ -219,19 +219,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">جواب</string> <string name="action_msg_reply">جواب</string>
<string name="action_msg_info">مشخصات پیام</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">ویرایش</string> <string name="action_msg_edit">ویرایش</string>
<string name="action_msg_copy">کپی</string> <string name="action_msg_copy">کپی</string>
<string name="action_msg_quote">نقل قول</string> <string name="action_msg_quote">نقل قول</string>
<string name="action_msg_delete">حذف</string> <string name="action_msg_delete">حذف</string>
<string name="action_msg_pin">سوزن کردن پیام</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">از سوزن دراوردن پیام</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">ستاره‌دار کردن پیام</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">از ستاره دراوردن پیام</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">اشتراک</string> <string name="action_msg_share">اشتراک</string>
<string name="action_title_editing">ویرایش پیام</string> <string name="action_title_editing">ویرایش پیام</string>
<string name="action_msg_add_reaction">اضافه کردن واکنش</string> <string name="action_msg_add_reaction">اضافه کردن واکنش</string>
<string name="action_msg_copy_permalink">Copy permalink</string> <!-- TODO Add translation --> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">گزارش</string> <string name="action_msg_report">گزارش</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -217,19 +217,19 @@ ...@@ -217,19 +217,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Répondre</string> <string name="action_msg_reply">Répondre</string>
<string name="action_msg_info">Informations sur le message</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Modifier</string> <string name="action_msg_edit">Modifier</string>
<string name="action_msg_copy">Copier</string> <string name="action_msg_copy">Copier</string>
<string name="action_msg_quote">Citation</string> <string name="action_msg_quote">Citation</string>
<string name="action_msg_delete">Effacer</string> <string name="action_msg_delete">Effacer</string>
<string name="action_msg_pin">Épingler message</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Ne plus épingler message</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">Ajouter aux Favoris</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Retirer des favoris</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Partager</string> <string name="action_msg_share">Partager</string>
<string name="action_title_editing">Modification du message</string> <string name="action_title_editing">Modification du message</string>
<string name="action_msg_add_reaction">Ajouter une réaction</string> <string name="action_msg_add_reaction">Ajouter une réaction</string>
<string name="action_msg_copy_permalink">copie permalien</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">rapport</string> <string name="action_msg_report">rapport</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -220,19 +220,19 @@ ...@@ -220,19 +220,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">जवाब दें</string> <string name="action_msg_reply">जवाब दें</string>
<string name="action_msg_info">संदेश जानकारी</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">संपादन करें</string> <string name="action_msg_edit">संपादन करें</string>
<string name="action_msg_copy">कॉपी</string> <string name="action_msg_copy">कॉपी</string>
<string name="action_msg_quote">उद्धरण</string> <string name="action_msg_quote">उद्धरण</string>
<string name="action_msg_delete">मिटायें</string> <string name="action_msg_delete">मिटायें</string>
<string name="action_msg_pin">संदेश को पिन करें</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">संदेश को पिन से हटाएँ</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">संदेश को स्टार करें</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">सन्देश अतारांकित करें</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">शेयर करें</string> <string name="action_msg_share">शेयर करें</string>
<string name="action_title_editing">संपादन संदेश</string> <string name="action_title_editing">संपादन संदेश</string>
<string name="action_msg_add_reaction">प्रतिक्रिया जोड़ें</string> <string name="action_msg_add_reaction">प्रतिक्रिया जोड़ें</string>
<string name="action_msg_copy_permalink">परमालिंक कॉपी करें</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">रिपोर्ट</string> <string name="action_msg_report">रिपोर्ट</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Rispondi</string> <string name="action_msg_reply">Rispondi</string>
<string name="action_msg_info">Informazioni messaggio</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Modifica</string> <string name="action_msg_edit">Modifica</string>
<string name="action_msg_copy">Copia</string> <string name="action_msg_copy">Copia</string>
<string name="action_msg_quote">Citazione</string> <string name="action_msg_quote">Citazione</string>
<string name="action_msg_delete">Cancella</string> <string name="action_msg_delete">Cancella</string>
<string name="action_msg_pin">Messaggio importante</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Messaggio normale</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">Messaggio preferito</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Messaggio normale</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Condividi</string> <string name="action_msg_share">Condividi</string>
<string name="action_title_editing">Modifica messaggio</string> <string name="action_title_editing">Modifica messaggio</string>
<string name="action_msg_add_reaction">Aggiungi reazione</string> <string name="action_msg_add_reaction">Aggiungi reazione</string>
<string name="action_msg_copy_permalink">Copia permalink</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">Resoconto</string> <string name="action_msg_report">Resoconto</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -219,19 +219,19 @@ ...@@ -219,19 +219,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">返信</string> <string name="action_msg_reply">返信</string>
<string name="action_msg_info">メッセージ情報</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">編集</string> <string name="action_msg_edit">編集</string>
<string name="action_msg_copy">コピー</string> <string name="action_msg_copy">コピー</string>
<string name="action_msg_quote">引用</string> <string name="action_msg_quote">引用</string>
<string name="action_msg_delete">削除</string> <string name="action_msg_delete">削除</string>
<string name="action_msg_pin">ピン留めする</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">ピン留を外す</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">スターをつける</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">スターを外す</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Share</string> <string name="action_msg_share">Share</string>
<string name="action_title_editing">メッセージの編集</string> <string name="action_title_editing">メッセージの編集</string>
<string name="action_msg_add_reaction">リアクションする</string> <string name="action_msg_add_reaction">リアクションする</string>
<string name="action_msg_copy_permalink">パーマリンクのコピー</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">Report</string> <!-- TODO - Add proper translation --> <string name="action_msg_report">Report</string> <!-- TODO - Add proper translation -->
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -219,19 +219,19 @@ ...@@ -219,19 +219,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Responder</string> <string name="action_msg_reply">Responder</string>
<string name="action_msg_info">Informações da mensagem</string> <string name="action_info">Informação</string>
<string name="action_msg_edit">Editar</string> <string name="action_msg_edit">Editar</string>
<string name="action_msg_copy">Copiar</string> <string name="action_msg_copy">Copiar</string>
<string name="action_msg_quote">Citar</string> <string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Remover</string> <string name="action_msg_delete">Remover</string>
<string name="action_msg_pin">Fixar mensagem</string> <string name="action_pin">Fixar</string>
<string name="action_msg_unpin">Desfixar mensagem</string> <string name="action_unpin">Desfixar</string>
<string name="action_msg_star">Marcar como favorita</string> <string name="action_star">Favoritar</string>
<string name="action_msg_unstar">Desmarcar como favorita</string> <string name="action_unstar">Desfavoritar</string>
<string name="action_msg_share">Compartilhar</string> <string name="action_msg_share">Compartilhar</string>
<string name="action_title_editing">Editando mensagem</string> <string name="action_title_editing">Editando mensagem</string>
<string name="action_msg_add_reaction">Adicionar reação</string> <string name="action_msg_add_reaction">Adicionar reação</string>
<string name="action_msg_copy_permalink">Copiar permalink</string> <string name="action_msg_permalink">Link permanente</string>
<string name="action_msg_report">Reportar</string> <string name="action_msg_report">Reportar</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Responder</string> <string name="action_msg_reply">Responder</string>
<string name="action_msg_info">Informação da mensagem</string> <string name="action_info">Informação</string>
<string name="action_msg_edit">Editar</string> <string name="action_msg_edit">Editar</string>
<string name="action_msg_copy">Copiar</string> <string name="action_msg_copy">Copiar</string>
<string name="action_msg_quote">Citar</string> <string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Apagar</string> <string name="action_msg_delete">Apagar</string>
<string name="action_msg_pin">Afixar mensagem</string> <string name="action_pin">Afixar</string>
<string name="action_msg_unpin">Desafixar mensagem</string> <string name="action_unpin">Desafixar</string>
<string name="action_msg_star">Dar um estrela</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Remover estrela</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Partilhar</string> <string name="action_msg_share">Partilhar</string>
<string name="action_title_editing">A editar mensagem</string> <string name="action_title_editing">A editar mensagem</string>
<string name="action_msg_add_reaction">Adicionar reacção</string> <string name="action_msg_add_reaction">Adicionar reacção</string>
<string name="action_msg_copy_permalink">Copiar link permanente</string> <string name="action_msg_permalink">Link permanente</string>
<string name="action_msg_report">Relatar</string> <string name="action_msg_report">Relatar</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Ответить</string> <string name="action_msg_reply">Ответить</string>
<string name="action_msg_info">Информация о прочтении</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Редактировать</string> <string name="action_msg_edit">Редактировать</string>
<string name="action_msg_copy">Копировать</string> <string name="action_msg_copy">Копировать</string>
<string name="action_msg_quote">Цитировать</string> <string name="action_msg_quote">Цитировать</string>
<string name="action_msg_delete">Удалить</string> <string name="action_msg_delete">Удалить</string>
<string name="action_msg_pin">Закрепить сообщение</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Открепить сообщение</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">В избранное</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Из избранного</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Поделиться</string> <string name="action_msg_share">Поделиться</string>
<string name="action_title_editing">Редактирование сообщения</string> <string name="action_title_editing">Редактирование сообщения</string>
<string name="action_msg_add_reaction">Отреагировать</string> <string name="action_msg_add_reaction">Отреагировать</string>
<string name="action_msg_copy_permalink">Копировать ссылку</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">Пожаловаться</string> <string name="action_msg_report">Пожаловаться</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -219,22 +219,21 @@ ...@@ -219,22 +219,21 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Kaydet</string> <string name="action_msg_reply">Kaydet</string>
<string name="action_msg_info">Mesaj bilgisi</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Dzenle</string> <string name="action_msg_edit">Dzenle</string>
<string name="action_msg_copy">Kopyala</string> <string name="action_msg_copy">Kopyala</string>
<string name="action_msg_quote">Alıntıla</string> <string name="action_msg_quote">Alıntıla</string>
<string name="action_msg_delete">Sil</string> <string name="action_msg_delete">Sil</string>
<string name="action_msg_pin">Mesajı Sabitle</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Mesajı Sabitleme</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">Mesajı Yıldızla</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Mesajı Yıldızlama</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Paylaş</string> <string name="action_msg_share">Paylaş</string>
<string name="action_title_editing">Mesaj Düzenleniyor</string> <string name="action_title_editing">Mesaj Düzenleniyor</string>
<string name="action_msg_add_reaction">Tepki Ekle</string> <string name="action_msg_add_reaction">Tepki Ekle</string>
<!-- TODO - Add proper translation --> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_copy_permalink">Copy permalink</string> <string name="action_msg_report">Report</string> <!-- TODO - Add proper translation -->
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string>
<!-- Permission messages --> <!-- Permission messages -->
<string name="permission_editing_not_allowed">Düzenlemeye izin verilmiyor</string> <string name="permission_editing_not_allowed">Düzenlemeye izin verilmiyor</string>
......
...@@ -215,22 +215,20 @@ ...@@ -215,22 +215,20 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Відповісти</string> <string name="action_msg_reply">Відповісти</string>
<string name="action_msg_info">Інформація про прочитання</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">Відредагувати</string> <string name="action_msg_edit">Відредагувати</string>
<string name="action_msg_copy">Скопіювати</string> <string name="action_msg_copy">Скопіювати</string>
<string name="action_msg_quote">Цитувати</string> <string name="action_msg_quote">Цитувати</string>
<string name="action_msg_delete">Видалити</string> <string name="action_msg_delete">Видалити</string>
<string name="action_msg_pin">Зафіксувати повідомлення</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">Відмінити фіксацію повідомлення</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">До обраного</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">Видалити з обраного</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Поділитися</string> <string name="action_msg_share">Поділитися</string>
<string name="action_title_editing">Редагування повідомлення</string> <string name="action_title_editing">Редагування повідомлення</string>
<string name="action_msg_add_reaction">Відреагувати</string> <string name="action_msg_add_reaction">Відреагувати</string>
<!-- TODO - Add proper translation --> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_copy_permalink">Copy permalink</string> <string name="action_msg_report">Report</string> <!-- TODO - Add proper translation -->
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string>
<!-- Permission messages --> <!-- Permission messages -->
<string name="permission_editing_not_allowed">Редагування заборонено</string> <string name="permission_editing_not_allowed">Редагування заборонено</string>
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">回复</string> <string name="action_msg_reply">回复</string>
<string name="action_msg_info">消息通知</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">编辑</string> <string name="action_msg_edit">编辑</string>
<string name="action_msg_copy">拷贝</string> <string name="action_msg_copy">拷贝</string>
<string name="action_msg_quote">引用</string> <string name="action_msg_quote">引用</string>
<string name="action_msg_delete">删除</string> <string name="action_msg_delete">删除</string>
<string name="action_msg_pin">固定消息</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">取消固定</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">标记消息</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">取消标记</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">分享消息</string> <string name="action_msg_share">分享消息</string>
<string name="action_title_editing">编辑消息</string> <string name="action_title_editing">编辑消息</string>
<string name="action_msg_add_reaction">增加操作</string> <string name="action_msg_add_reaction">增加操作</string>
<string name="action_msg_copy_permalink">拷贝永久链接</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">报告</string> <string name="action_msg_report">报告</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -216,19 +216,19 @@ ...@@ -216,19 +216,19 @@
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">回覆</string> <string name="action_msg_reply">回覆</string>
<string name="action_msg_info">訊息通知</string> <string name="action_info">Info</string> <!-- TODO Add translation -->
<string name="action_msg_edit">編輯</string> <string name="action_msg_edit">編輯</string>
<string name="action_msg_copy">複製</string> <string name="action_msg_copy">複製</string>
<string name="action_msg_quote">引用</string> <string name="action_msg_quote">引用</string>
<string name="action_msg_delete">刪除</string> <string name="action_msg_delete">刪除</string>
<string name="action_msg_pin">釘選訊息</string> <string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_msg_unpin">取消釘選訊息</string> <string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_msg_star">標註訊息</string> <string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_msg_unstar">取消標註訊息</string> <string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">分享訊息</string> <string name="action_msg_share">分享訊息</string>
<string name="action_title_editing">編輯訊息</string> <string name="action_title_editing">編輯訊息</string>
<string name="action_msg_add_reaction">增加操作</string> <string name="action_msg_add_reaction">增加操作</string>
<string name="action_msg_copy_permalink">複製永久連結</string> <string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">回報</string> <string name="action_msg_report">回報</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -232,19 +232,19 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin ...@@ -232,19 +232,19 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!-- Message actions --> <!-- Message actions -->
<string name="action_msg_reply">Reply</string> <string name="action_msg_reply">Reply</string>
<string name="action_msg_info">Message info</string> <string name="action_info">Info</string>
<string name="action_msg_edit">Edit</string> <string name="action_msg_edit">Edit</string>
<string name="action_msg_copy">Copy</string> <string name="action_msg_copy">Copy</string>
<string name="action_msg_quote">Quote</string> <string name="action_msg_quote">Quote</string>
<string name="action_msg_delete">Delete</string> <string name="action_msg_delete">Delete</string>
<string name="action_msg_pin">Pin Message</string> <string name="action_pin">Pin</string>
<string name="action_msg_unpin">Unpin Message</string> <string name="action_unpin">Unpin</string>
<string name="action_msg_star">Star Message</string> <string name="action_star">Star</string>
<string name="action_msg_unstar">Unstar Message</string> <string name="action_unstar">Unstar</string>
<string name="action_msg_share">Share</string> <string name="action_msg_share">Share</string>
<string name="action_title_editing">Editing Message</string> <string name="action_title_editing">Editing Message</string>
<string name="action_msg_add_reaction">Add reaction</string> <string name="action_msg_add_reaction">Add reaction</string>
<string name="action_msg_copy_permalink">Copy permalink</string> <string name="action_msg_permalink">Permalink</string>
<string name="action_msg_report">Report</string> <string name="action_msg_report">Report</string>
<!-- Permission messages --> <!-- Permission messages -->
......
...@@ -35,7 +35,7 @@ class AnswersAnalytics : Analytics { ...@@ -35,7 +35,7 @@ class AnswersAnalytics : Analytics {
override fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) = override fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) =
Answers.getInstance() Answers.getInstance()
.logCustom( .logCustom(
CustomEvent("message_sent") CustomEvent("message_actionsent")
.putCustomAttribute("subscription_type", event.subscriptionTypeName) .putCustomAttribute("subscription_type", event.subscriptionTypeName)
.putCustomAttribute("server", serverUrl) .putCustomAttribute("server", serverUrl)
) )
...@@ -83,4 +83,25 @@ class AnswersAnalytics : Analytics { ...@@ -83,4 +83,25 @@ class AnswersAnalytics : Analytics {
.putCustomAttribute("server", serverUrl) .putCustomAttribute("server", serverUrl)
) )
override fun logMessageActionAddReaction() = Answers.getInstance().logCustom(CustomEvent("message_action_add_reaction"))
override fun logMessageActionReply() = Answers.getInstance().logCustom(CustomEvent("message_action_reply"))
override fun logMessageActionQuote() = Answers.getInstance().logCustom(CustomEvent("message_action_quote"))
override fun logMessageActionPermalink() = Answers.getInstance().logCustom(CustomEvent("message_action_permalink"))
override fun logMessageActionCopy() = Answers.getInstance().logCustom(CustomEvent("message_action_copy"))
override fun logMessageActionEdit() = Answers.getInstance().logCustom(CustomEvent("message_action_edit"))
override fun logMessageActionInfo() = Answers.getInstance().logCustom(CustomEvent("message_action_info"))
override fun logMessageActionStar() = Answers.getInstance().logCustom(CustomEvent("message_action_star"))
override fun logMessageActionPin() = Answers.getInstance().logCustom(CustomEvent("message_action_pin"))
override fun logMessageActionReport() = Answers.getInstance().logCustom(CustomEvent("message_action_report"))
override fun logMessageActionDelete() = Answers.getInstance().logCustom(CustomEvent("message_action_delete"))
} }
...@@ -72,4 +72,26 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) : ...@@ -72,4 +72,26 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) :
putString("server", serverUrl) putString("server", serverUrl)
}) })
} }
override fun logMessageActionAddReaction() = firebaseAnalytics.logEvent("message_action_add_reaction", null)
override fun logMessageActionReply() = firebaseAnalytics.logEvent("message_action_reply", null)
override fun logMessageActionQuote() = firebaseAnalytics.logEvent("message_action_quote", null)
override fun logMessageActionPermalink() = firebaseAnalytics.logEvent("message_action_permalink", null)
override fun logMessageActionCopy() = firebaseAnalytics.logEvent("message_action_copy", null)
override fun logMessageActionEdit() = firebaseAnalytics.logEvent("message_action_edit", null)
override fun logMessageActionInfo() = firebaseAnalytics.logEvent("message_action_info", null)
override fun logMessageActionStar() = firebaseAnalytics.logEvent("message_action_star", null)
override fun logMessageActionPin() = firebaseAnalytics.logEvent("message_action_pin", null)
override fun logMessageActionReport() = firebaseAnalytics.logEvent("message_action_report", null)
override fun logMessageActionDelete() = firebaseAnalytics.logEvent("message_action_delete", null)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment