Unverified Commit e73f28fd authored by Divyanshu Bhargava's avatar Divyanshu Bhargava Committed by GitHub

Merge pull request #6 from RocketChat/develop

merge
parents 2334981d acb0f6f3
......@@ -18,7 +18,7 @@ android {
applicationId "chat.rocket.android"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 2058
versionCode 2060
versionName "3.3.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
......
......@@ -80,4 +80,58 @@ interface Analytics {
*/
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(
}
}
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() }
}
}
}
......@@ -85,20 +85,20 @@ class LoginPresenter @Inject constructor(
}
}
val myself = retryIO("me()") { client.me() }
if (myself.username != null) {
myself.username?.let { username ->
val user = User(
id = myself.id,
roles = myself.roles,
status = myself.status,
name = myself.name,
emails = myself.emails?.map { Email(it.address ?: "", it.verified) },
username = myself.username,
username = username,
utcOffset = myself.utcOffset
)
localRepository.saveCurrentUser(currentServer, user)
saveCurrentServer.save(currentServer)
localRepository.save(LocalRepository.CURRENT_USERNAME_KEY, myself.username)
saveAccount(myself.username!!)
localRepository.save(LocalRepository.CURRENT_USERNAME_KEY, username)
saveAccount(username)
saveToken(token)
analyticsManager.logLogin(
AuthenticationEvent.AuthenticationWithUserAndPassword,
......@@ -133,7 +133,7 @@ class LoginPresenter @Inject constructor(
fun forgotPassword() = navigator.toForgotPassword()
private suspend fun saveAccount(username: String) {
private fun saveAccount(username: String) {
val icon = settings.favicon()?.let {
currentServer.serverLogoUrl(it)
}
......
......@@ -173,7 +173,7 @@ class LoginOptionsPresenter @Inject constructor(
settings = settingsInteractor.get(currentServer)
}
private suspend fun saveAccount(username: String) {
private fun saveAccount(username: String) {
val icon = settings.favicon()?.let {
currentServer.serverLogoUrl(it)
}
......
......@@ -94,7 +94,7 @@ class TwoFAPresenter @Inject constructor(
}
}
private suspend fun saveAccount(me: Myself) {
private fun saveAccount(me: Myself) {
val icon = settings.favicon()?.let {
currentServer.serverLogoUrl(it)
}
......
......@@ -20,7 +20,7 @@ internal fun ChatDetailsFragment.setupMenu(menu: Menu) {
MENU_ACTION_VIDEO_CALL,
Menu.NONE,
R.string.msg_video_call
).setIcon(R.drawable.ic_video_24dp).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM)
).setIcon(R.drawable.ic_video_white_24dp).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM)
}
}
}
......
......@@ -92,14 +92,14 @@ abstract class BaseViewHolder<T : BaseUiModel<*>>(
data?.let { vm ->
vm.message.let {
val menuItems = view.context.inflate(R.menu.message_actions).toList()
menuItems.find { it.itemId == R.id.action_message_unpin }?.apply {
setTitle(if (it.pinned) R.string.action_msg_unpin else R.string.action_msg_pin)
menuItems.find { it.itemId == R.id.action_pin }?.apply {
setTitle(if (it.pinned) R.string.action_unpin else R.string.action_pin)
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
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
}
view.context?.let {
......
......@@ -5,6 +5,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.R
import chat.rocket.android.analytics.AnalyticsManager
import chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import chat.rocket.android.chatroom.uimodel.AttachmentUiModel
import chat.rocket.android.chatroom.uimodel.BaseUiModel
......@@ -29,7 +30,8 @@ class ChatRoomAdapter(
private val actionSelectListener: OnActionSelected? = null,
private val enableActions: Boolean = true,
private val reactionListener: EmojiReactionListener? = null,
private val navigator: ChatRoomNavigator? = null
private val navigator: ChatRoomNavigator? = null,
private val analyticsManager: AnalyticsManager? = null
) : RecyclerView.Adapter<BaseViewHolder<*>>() {
private val dataSet = ArrayList<BaseUiModel<*>>()
......@@ -239,47 +241,63 @@ class ChatRoomAdapter(
override fun isActionsEnabled(): Boolean = enableActions
override fun onActionSelected(item: MenuItem, message: Message) {
message.apply {
when (item.itemId) {
R.id.action_message_info -> {
actionSelectListener?.showMessageInfo(id)
}
R.id.action_message_reply -> {
if (roomName != null && roomType != null) {
actionSelectListener?.citeMessage(roomName, roomType, id, true)
if (analyticsManager != null && roomName != null && roomType != null && actionSelectListener != null) {
with(message) {
when (item.itemId) {
R.id.action_info -> {
actionSelectListener.showMessageInfo(id)
analyticsManager.logMessageActionInfo()
}
}
R.id.action_message_quote -> {
if (roomName != null && roomType != null) {
actionSelectListener?.citeMessage(roomName, roomType, id, false)
R.id.action_reply -> {
actionSelectListener.citeMessage(roomName, roomType, id, true)
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
?: requireNotNull(arguments) { "no arguments supplied when the fragment was instantiated" }
adapter = ChatRoomAdapter(
chatRoomId,
chatRoomType,
chatRoomName,
this,
roomId = chatRoomId,
roomType = chatRoomType,
roomName = chatRoomName,
actionSelectListener = this,
reactionListener = this,
navigator = navigator
navigator = navigator,
analyticsManager = analyticsManager
)
}
......
......@@ -38,6 +38,7 @@ private fun ChatRoomFragment.setupSearchMessageMenuItem(menu: Menu, context: Con
(searchItem.actionView as? SearchView)?.let {
// TODO: Check why we need to stylize the search text programmatically instead of by defining it in the styles.xml (ChatRoom.SearchView)
it.maxWidth = Integer.MAX_VALUE
stylizeSearchView(it, context)
setupSearchViewTextListener(it)
if (it.isIconified) {
......
......@@ -204,7 +204,7 @@ class UiModelMapper @Inject constructor(
private fun mapVisibleActions(viewModel: BaseUiModel<*>) {
if (!settings.messageReadReceiptStoreUsers()) {
viewModel.menuItemsToHide.add(R.id.action_message_info)
viewModel.menuItemsToHide.add(R.id.action_info)
}
}
......
......@@ -210,7 +210,7 @@ class MainPresenter @Inject constructor(
}
}
private suspend fun saveAccount(uiModel: NavHeaderUiModel) {
private fun saveAccount(uiModel: NavHeaderUiModel) {
val icon = settings.favicon()?.let {
currentServer.serverLogoUrl(it)
}
......
......@@ -3,6 +3,7 @@ package chat.rocket.android.server.domain
import chat.rocket.android.server.domain.model.Account
interface AccountsRepository {
fun save(account: Account)
fun load(): List<Account>
fun remove(serverUrl: String)
......
......@@ -3,7 +3,8 @@ package chat.rocket.android.server.domain
import javax.inject.Inject
class GetAccountInteractor @Inject constructor(val repository: AccountsRepository) {
suspend fun get(url: String) = repository.load().firstOrNull { account ->
fun get(url: String) = repository.load().firstOrNull { account ->
url == account.serverUrl
}
}
\ No newline at end of file
......@@ -3,7 +3,8 @@ package chat.rocket.android.server.domain
import javax.inject.Inject
class RemoveAccountInteractor @Inject constructor(val repository: AccountsRepository) {
suspend fun remove(serverUrl: String) {
fun remove(serverUrl: String) {
repository.remove(serverUrl)
}
}
\ No newline at end of file
......@@ -4,5 +4,5 @@ import chat.rocket.android.server.domain.model.Account
import javax.inject.Inject
class SaveAccountInteractor @Inject constructor(val repository: AccountsRepository) {
suspend fun save(account: Account) = repository.save(account)
fun save(account: Account) = repository.save(account)
}
\ No newline at end of file
......@@ -15,7 +15,12 @@ class SharedPreferencesAccountsRepository(
) : AccountsRepository {
override fun save(account: Account) {
save(load().filter { item -> item.serverUrl != item.serverUrl }.toMutableList().apply { add(0, account) })
load().filter { it.serverUrl != account.serverUrl }
.toMutableList()
.apply {
add(0, account)
save(this)
}
}
override fun load(): List<Account> {
......@@ -23,7 +28,7 @@ class SharedPreferencesAccountsRepository(
val type = Types.newParameterizedType(List::class.java, Account::class.java)
val adapter = moshi.adapter<List<Account>>(type)
return json?.let { adapter.fromJson(it) ?: emptyList() } ?: emptyList()
return json?.let { adapter.fromJson(it) } ?: emptyList()
}
override fun remove(serverUrl: String) {
......@@ -33,8 +38,6 @@ class SharedPreferencesAccountsRepository(
private fun save(accounts: List<Account>) {
val type = Types.newParameterizedType(List::class.java, Account::class.java)
val adapter = moshi.adapter<List<Account>>(type)
preferences.edit {
putString(ACCOUNTS_KEY, adapter.toJson(accounts))
}
preferences.edit { putString(ACCOUNTS_KEY, adapter.toJson(accounts)) }
}
}
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="#FFFFFF"
android:fillType="evenOdd"
android:pathData="M16.538,13.564l-3.388,-1.09v-2.07l3.394,-1.085 -0.006,4.245zM11.696,14.56L3.454,14.56L3.454,8.32h8.242v6.24zM17.428,8.107c0.362,0.261 0.57,0.69 0.57,1.176v4.312c0,0.487 -0.209,0.914 -0.57,1.175a1.37,1.37 0,0 1,-0.808 0.254c-0.164,0 -0.331,-0.026 -0.498,-0.08l-2.972,-0.956L13.15,16L2,16L2,6.88h11.15v2.01l2.973,-0.956c0.468,-0.15 0.943,-0.087 1.305,0.173zM4.424,5.44L4.424,4h6.302v1.44L4.424,5.44z" />
</vector>
......@@ -3,27 +3,27 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:background="?selectableItemBackground">
android:background="?selectableItemBackground"
android:padding="16dp">
<ImageView
android:id="@+id/server_logo"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_add_24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:text="@string/action_add_account"
app:layout_constraintTop_toTopOf="parent"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/server_logo"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -2,60 +2,57 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_message_info"
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:id="@+id/action_add_reaction"
android:icon="@drawable/ic_add_reaction"
android:title="@string/action_msg_add_reaction" />
<item
android:id="@+id/action_message_permalink"
android:icon="@drawable/ic_action_message_link_24dp"
android:title="@string/action_msg_copy_permalink" />
android:id="@+id/action_reply"
android:icon="@drawable/ic_action_message_reply_24dp"
android:title="@string/action_msg_reply" />
<item
android:id="@+id/action_message_quote"
android:id="@+id/action_quote"
android:icon="@drawable/ic_action_message_quote_24dp"
android:title="@string/action_msg_quote" />
<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:title="@string/action_msg_copy" />
<!--<item-->
<!--android:id="@+id/action_menu_msg_share"-->
<!--andrtextIconicon="@drawable/ic_share_black_24px"-->
<!--android:title="@string/action_msg_share" />-->
<item
android:id="@+id/action_edit"
android:icon="@drawable/ic_action_message_edit_24dp"
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
android:id="@+id/action_message_star"
android:id="@+id/action_star"
android:icon="@drawable/ic_action_message_star_24dp"
android:title="@string/action_msg_star" />
android:title="@string/action_star" />
<item
android:id="@+id/action_message_unpin"
android:id="@+id/action_pin"
android:icon="@drawable/ic_action_message_pin_24dp"
android:title="@string/action_msg_pin" />
android:title="@string/action_pin" />
<item
android:id="@+id/action_message_report"
android:id="@+id/action_report"
android:icon="@drawable/ic_action_message_report_24dp"
android:title="@string/action_msg_report" />
<item
android:id="@+id/action_message_delete"
android:id="@+id/action_delete"
android:icon="@drawable/ic_action_message_delete_24dp"
android:title="@string/action_msg_delete" />
</menu>
\ No newline at end of file
This diff is collapsed.
......@@ -62,14 +62,14 @@
<string name="action_register">Registrieren</string>
<string name="action_confirm">Bestätigen</string>
<string name="action_delete_account">Konto löschen</string>
<string name="action_favorite">Favorite</string> <!-- TODO Add translation -->
<string name="action_remove_favorite">Remove favorite</string> <!-- TODO Add translation -->
<string name="action_favorite">Favoriten</string>
<string name="action_remove_favorite">Favoriten entfernen</string>
<!-- Settings List -->
<string-array name="settings_actions">
<item name="item_preferences">Eigenschaften</item>
<item name="item_password">Passwort ändern</item>
<item name="change_language">Change language</item> <!-- TODO Add translation -->
<item name="change_language">Sprache ändern</item>
<item name="item_share_app">Link zur App teilen</item>
<item name="item_rate_us">Bewerten Sie uns</item>
<item name="item_contact_us">Kontaktieren Sie uns</item>
......@@ -99,8 +99,8 @@
<string name="msg_yesterday">Gestern</string>
<string name="msg_today">Heute</string>
<string name="msg_message">Nachricht</string>
<string name="msg_video_call">Video call</string> <!-- TODO Add translation -->
<string name="msg_join_video_call">Join video call</string> <!-- TODO Add translation -->
<string name="msg_video_call">Videoanruf</string>
<string name="msg_join_video_call">Videoanruf beitreten</string>
<string name="msg_this_room_is_read_only">Dieser Raum ist nur lesen</string>
<string name="msg_invalid_2fa_code">Falscher 2FA Code</string>
<string name="msg_invalid_file">Falsche Datei</string>
......@@ -132,7 +132,7 @@
<string name="msg_preview_photo">Bild</string>
<string name="msg_preview_file">Datei</string>
<string name="msg_no_messages_yet">Noch keine Nachrichten</string>
<string name="msg_build">Build %1$d - %2$s - %3$s</string> <!-- TODO Add translation -->
<string name="msg_build">Build %1$d - %2$s - %3$s</string>
<string name="msg_update_app_version_in_order_to_continue">Server Version veraltet. Bitte kontaktieren Sie ihren Server Administrator.</string>
<string name="msg_ver_not_recommended">Die Server Version scheint älter als die empfolene Version %1$s zu sein.\nSie können sich trotzdem einloggen, aber es kann zu einem unerwartetem Verhalten kommen.</string>
<string name="msg_ver_not_minimum">Die Server Version scheint älter als die minimale Version %1$s zu sein.\nBitte updaten Sie Ihren Server um sich einloggen zu können!</string>
......@@ -168,9 +168,9 @@
<string name="msg_two_factor_authentication">Zwei-Faktor-Authentifizierung</string>
<string name="msg__your_2fa_code">Wie lautet Ihr F2A Code?</string>
<string name="msg_muted_on_this_channel">Sie sind auf diesem Kanal stummgeschaltet</string>
<string name="msg_no_topic">No topic</string> <!-- TODO Add translation -->
<string name="msg_no_announcement">No announcement</string> <!-- TODO Add translation -->
<string name="msg_no_description">No description</string> <!-- TODO Add translation -->
<string name="msg_no_topic">Keine Überschrift</string>
<string name="msg_no_announcement">Keine Ankündigung</string>
<string name="msg_no_description">Keine Beschreibung</string>
<string name="msg_unable_to_update_password">Änderung des Passworts nicht möglich. Fehlermeldung: %1$s</string>
<string name="msg_password_updated_successfully">Passwort erfolgreich geändert</string>
<plurals name="msg_reacted_with_">
......@@ -185,7 +185,7 @@
<string name="msg_public_channel">Öffentlich</string>
<string name="msg_private_channel_description">Nur Sie und eingeladene Benutzer haben Zugriff auf den Raum</string>
<string name="msg_public_channel_description">Jeder hat Zugriff auf diesen Raum</string>
<string name="msg_ready_only_channel">Nur lesen Raum</string>
<string name="msg_ready_only_channel">Nur lesend</string>
<string name="msg_ready_only_channel_description">Nur der Admin kann neue Nachrichten schreiben</string>
<string name="msg_invite_members">Lade Benutzer in diesen Raum ein</string>
<string name="msg_member_already_added">Sie haben diesen Benutzer bereits selektiert</string>
......@@ -221,23 +221,23 @@
<string name="message_unmuted">Benutzer %1$s nicht mehr stumm geschaltet von %2$s</string>
<string name="message_role_add">%1$s wurde gesetzt %2$s von %3$s</string>
<string name="message_role_removed">%1$s ist nicht länger %2$s von %3$s</string>
<string name="message_video_call_started">Video call started by %1$s</string> <!-- TODO Add translation -->
<string name="message_video_call_started">Videoanruf von %1$s gestartet</string>
<!-- Message actions -->
<string name="action_msg_reply">Antworten</string>
<string name="action_msg_info">Nachrichten Info</string>
<string name="action_info">Info</string>
<string name="action_msg_edit">Bearbeiten</string>
<string name="action_msg_copy">Kopieren</string>
<string name="action_msg_quote">Zitieren</string>
<string name="action_msg_delete">Löschen</string>
<string name="action_msg_pin">Nachricht anheften</string>
<string name="action_msg_unpin">Nachricht nicht mehr anheften</string>
<string name="action_msg_star">Nachricht favorisieren</string>
<string name="action_msg_unstar">Nachricht nicht mehr favorisieren</string>
<string name="action_pin">Anheften</string>
<string name="action_unpin">Nicht anheften</string>
<string name="action_star">Favorisieren</string>
<string name="action_unstar">Nicht favorisieren</string>
<string name="action_msg_share">Teilen</string>
<string name="action_title_editing">Nachricht bearbeiten</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>
<string name="action_msg_report">Bericht</string>
<!-- Permission messages -->
......@@ -325,7 +325,7 @@
<string name="chatroom_header">Kopf</string>
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_favorite">Favoriten</string>
<string name="header_channel">Räume</string>
<string name="header_private_groups">Private Räume</string>
<string name="header_direct_messages">Direkt Nachrichten</string>
......
......@@ -214,19 +214,19 @@
<!-- Message actions -->
<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_copy">Copiar</string>
<string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Borrar</string>
<string name="action_msg_pin">Fijar mensaje</string>
<string name="action_msg_unpin">Soltar mensaje</string>
<string name="action_msg_star">Star mensaje</string>
<string name="action_msg_unstar">Unstar mensaje</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Compartir</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_copy_permalink">Copiar permalink</string>
<string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string>
......
......@@ -219,19 +219,19 @@
<!-- Message actions -->
<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_copy">کپی</string>
<string name="action_msg_quote">نقل قول</string>
<string name="action_msg_delete">حذف</string>
<string name="action_msg_pin">سوزن کردن پیام</string>
<string name="action_msg_unpin">از سوزن دراوردن پیام</string>
<string name="action_msg_star">ستاره‌دار کردن پیام</string>
<string name="action_msg_unstar">از ستاره دراوردن پیام</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">اشتراک</string>
<string name="action_title_editing">ویرایش پیام</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>
<!-- Permission messages -->
......
......@@ -217,19 +217,19 @@
<!-- Message actions -->
<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_copy">Copier</string>
<string name="action_msg_quote">Citation</string>
<string name="action_msg_delete">Effacer</string>
<string name="action_msg_pin">Épingler message</string>
<string name="action_msg_unpin">Ne plus épingler message</string>
<string name="action_msg_star">Ajouter aux Favoris</string>
<string name="action_msg_unstar">Retirer des favoris</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Partager</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_copy_permalink">copie permalien</string>
<string name="action_msg_permalink">Permalink</string> <!-- TODO Add translation -->
<string name="action_msg_report">rapport</string>
<!-- Permission messages -->
......
......@@ -220,19 +220,19 @@
<!-- Message actions -->
<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_copy">कॉपी</string>
<string name="action_msg_quote">उद्धरण</string>
<string name="action_msg_delete">मिटायें</string>
<string name="action_msg_pin">संदेश को पिन करें</string>
<string name="action_msg_unpin">संदेश को पिन से हटाएँ</string>
<string name="action_msg_star">संदेश को स्टार करें</string>
<string name="action_msg_unstar">सन्देश अतारांकित करें</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">शेयर करें</string>
<string name="action_title_editing">संपादन संदेश</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>
<!-- Permission messages -->
......
......@@ -216,19 +216,19 @@
<!-- Message actions -->
<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_copy">Copia</string>
<string name="action_msg_quote">Citazione</string>
<string name="action_msg_delete">Cancella</string>
<string name="action_msg_pin">Messaggio importante</string>
<string name="action_msg_unpin">Messaggio normale</string>
<string name="action_msg_star">Messaggio preferito</string>
<string name="action_msg_unstar">Messaggio normale</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Condividi</string>
<string name="action_title_editing">Modifica messaggio</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>
<!-- Permission messages -->
......
......@@ -219,19 +219,19 @@
<!-- Message actions -->
<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_copy">コピー</string>
<string name="action_msg_quote">引用</string>
<string name="action_msg_delete">削除</string>
<string name="action_msg_pin">ピン留めする</string>
<string name="action_msg_unpin">ピン留を外す</string>
<string name="action_msg_star">スターをつける</string>
<string name="action_msg_unstar">スターを外す</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Share</string>
<string name="action_title_editing">メッセージの編集</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 -->
<!-- Permission messages -->
......
......@@ -219,19 +219,19 @@
<!-- Message actions -->
<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_copy">Copiar</string>
<string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Remover</string>
<string name="action_msg_pin">Fixar mensagem</string>
<string name="action_msg_unpin">Desfixar mensagem</string>
<string name="action_msg_star">Marcar como favorita</string>
<string name="action_msg_unstar">Desmarcar como favorita</string>
<string name="action_pin">Fixar</string>
<string name="action_unpin">Desfixar</string>
<string name="action_star">Favoritar</string>
<string name="action_unstar">Desfavoritar</string>
<string name="action_msg_share">Compartilhar</string>
<string name="action_title_editing">Editando mensagem</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>
<!-- Permission messages -->
......
......@@ -216,19 +216,19 @@
<!-- Message actions -->
<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_copy">Copiar</string>
<string name="action_msg_quote">Citar</string>
<string name="action_msg_delete">Apagar</string>
<string name="action_msg_pin">Afixar mensagem</string>
<string name="action_msg_unpin">Desafixar mensagem</string>
<string name="action_msg_star">Dar um estrela</string>
<string name="action_msg_unstar">Remover estrela</string>
<string name="action_pin">Afixar</string>
<string name="action_unpin">Desafixar</string>
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Partilhar</string>
<string name="action_title_editing">A editar mensagem</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>
<!-- Permission messages -->
......
......@@ -59,8 +59,8 @@
<string name="action_register">Зарегистрировать</string>
<string name="action_confirm">Подтвердить</string>
<string name="action_delete_account">Удалить аккаунт</string>
<string name="action_favorite">Favorite</string> <!-- TODO Add translation -->
<string name="action_remove_favorite">Remove favorite</string> <!-- TODO Add translation -->
<string name="action_favorite">В избранное</string>
<string name="action_remove_favorite">Удалить из избранного</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -96,8 +96,8 @@
<string name="msg_yesterday">Вчера</string>
<string name="msg_today">Сегодня</string>
<string name="msg_message">Сообщение</string>
<string name="msg_video_call">Video call</string> <!-- TODO Add translation -->
<string name="msg_join_video_call">Join video call</string> <!-- TODO Add translation -->
<string name="msg_video_call">Видеозвонок</string>
<string name="msg_join_video_call">Присоединиться к видеозвонку</string>
<string name="msg_this_room_is_read_only">Канал только для чтения</string>
<string name="msg_invalid_2fa_code">Неверный код 2FA</string>
<string name="msg_invalid_file">Неверный файл</string>
......@@ -166,9 +166,9 @@
<string name="msg_view_more">больше</string>
<string name="msg_view_less">меньше</string>
<string name="msg_permalink_copied">Ссылка скопирована</string>
<string name="msg_no_topic">No topic</string> <!-- TODO Add translation -->
<string name="msg_no_announcement">No announcement</string> <!-- TODO Add translation -->
<string name="msg_no_description">No description</string> <!-- TODO Add translation -->
<string name="msg_no_topic">Нет темы</string>
<string name="msg_no_announcement">Нет объявления</string>
<string name="msg_no_description">Нет описания</string>
<string name="msg_send_email">Отправить e-mail</string>
<string name="msg_android_app_support">Поддержка Android-приложения</string>
<string name="msg_muted_on_this_channel">Вы лишены дара речи на этом канале</string>
......@@ -212,23 +212,23 @@
<string name="message_unmuted">Пользователю %1$s вернули дар речи по решению %2$s</string>
<string name="message_role_add">%1$s был назначен %2$s пользователем %3$s</string>
<string name="message_role_removed">%1$s больше не %2$s по решению %3$s</string>
<string name="message_video_call_started">Video call started by %1$s</string> <!-- TODO Add translation -->
<string name="message_video_call_started">Видеозвонок, начатый %1$s</string>
<!-- Message actions -->
<string name="action_msg_reply">Ответить</string>
<string name="action_msg_info">Информация о прочтении</string>
<string name="action_info">Информация о прочтении</string>
<string name="action_msg_edit">Редактировать</string>
<string name="action_msg_copy">Копировать</string>
<string name="action_msg_quote">Цитировать</string>
<string name="action_msg_delete">Удалить</string>
<string name="action_msg_pin">Закрепить сообщение</string>
<string name="action_msg_unpin">Открепить сообщение</string>
<string name="action_msg_star">В избранное</string>
<string name="action_msg_unstar">Из избранного</string>
<string name="action_pin">Закрепить сообщение</string>
<string name="action_unpin">Открепить сообщение</string>
<string name="action_star">В избранное</string>
<string name="action_unstar">Из избранного</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_copy_permalink">Копировать ссылку</string>
<string name="action_msg_permalink">Копировать ссылку</string>
<string name="action_msg_report">Пожаловаться</string>
<!-- Permission messages -->
......@@ -316,7 +316,7 @@
<string name="chatroom_header">Заголовок</string>
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_favorite">Избранные</string>
<string name="header_channel">Каналы</string>
<string name="header_private_groups">Приватные каналы</string>
<string name="header_direct_messages">Личная переписка</string>
......
......@@ -219,22 +219,21 @@
<!-- Message actions -->
<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_copy">Kopyala</string>
<string name="action_msg_quote">Alıntıla</string>
<string name="action_msg_delete">Sil</string>
<string name="action_msg_pin">Mesajı Sabitle</string>
<string name="action_msg_unpin">Mesajı Sabitleme</string>
<string name="action_msg_star">Mesajı Yıldızla</string>
<string name="action_msg_unstar">Mesajı Yıldızlama</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Paylaş</string>
<string name="action_title_editing">Mesaj Düzenleniyor</string>
<string name="action_msg_add_reaction">Tepki Ekle</string>
<!-- TODO - Add proper translation -->
<string name="action_msg_copy_permalink">Copy permalink</string>
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string>
<string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string> <!-- TODO - Add proper translation -->
<!-- Permission messages -->
<string name="permission_editing_not_allowed">Düzenlemeye izin verilmiyor</string>
......
......@@ -215,22 +215,20 @@
<!-- Message actions -->
<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_copy">Скопіювати</string>
<string name="action_msg_quote">Цитувати</string>
<string name="action_msg_delete">Видалити</string>
<string name="action_msg_pin">Зафіксувати повідомлення</string>
<string name="action_msg_unpin">Відмінити фіксацію повідомлення</string>
<string name="action_msg_star">До обраного</string>
<string name="action_msg_unstar">Видалити з обраного</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">Поділитися</string>
<string name="action_title_editing">Редагування повідомлення</string>
<string name="action_msg_add_reaction">Відреагувати</string>
<!-- TODO - Add proper translation -->
<string name="action_msg_copy_permalink">Copy permalink</string>
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string>
<string name="action_msg_permalink">Permalink</string> <!-- TODO - Add proper translation -->
<string name="action_msg_report">Report</string> <!-- TODO - Add proper translation -->
<!-- Permission messages -->
<string name="permission_editing_not_allowed">Редагування заборонено</string>
......
......@@ -216,19 +216,19 @@
<!-- Message actions -->
<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_copy">拷贝</string>
<string name="action_msg_quote">引用</string>
<string name="action_msg_delete">删除</string>
<string name="action_msg_pin">固定消息</string>
<string name="action_msg_unpin">取消固定</string>
<string name="action_msg_star">标记消息</string>
<string name="action_msg_unstar">取消标记</string>
<string name="action_pin">Pin</string> <!-- TODO Add translation -->
<string name="action_unpin">Unpin</string> <!-- TODO Add translation -->
<string name="action_star">Star</string> <!-- TODO Add translation -->
<string name="action_unstar">Unstar</string> <!-- TODO Add translation -->
<string name="action_msg_share">分享消息</string>
<string name="action_title_editing">编辑消息</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>
<!-- Permission messages -->
......
This diff is collapsed.
......@@ -232,19 +232,19 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!-- Message actions -->
<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_copy">Copy</string>
<string name="action_msg_quote">Quote</string>
<string name="action_msg_delete">Delete</string>
<string name="action_msg_pin">Pin Message</string>
<string name="action_msg_unpin">Unpin Message</string>
<string name="action_msg_star">Star Message</string>
<string name="action_msg_unstar">Unstar Message</string>
<string name="action_pin">Pin</string>
<string name="action_unpin">Unpin</string>
<string name="action_star">Star</string>
<string name="action_unstar">Unstar</string>
<string name="action_msg_share">Share</string>
<string name="action_title_editing">Editing Message</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>
<!-- Permission messages -->
......
......@@ -35,7 +35,7 @@ class AnswersAnalytics : Analytics {
override fun logMessageSent(event: SubscriptionTypeEvent, serverUrl: String) =
Answers.getInstance()
.logCustom(
CustomEvent("message_sent")
CustomEvent("message_actionsent")
.putCustomAttribute("subscription_type", event.subscriptionTypeName)
.putCustomAttribute("server", serverUrl)
)
......@@ -83,4 +83,25 @@ class AnswersAnalytics : Analytics {
.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) :
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