Unverified Commit 9719e71c authored by Divyanshu Bhargava's avatar Divyanshu Bhargava Committed by GitHub

Merge pull request #70 from RocketChat/develop

merge
parents 4abb4b09 4975cdb5
---
name: Bug report
about: Create a bug report to help us improve
---
## Describe the bug
<!-- A clear and concise description of what the bug is. -->
## To Reproduce
<!--Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error -->
## Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
## Logs
<!-- Please add logs in case of any crash or applicable error. -->
## Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
## Devices and Versions
<!-- Version can be found by opening the side menu and then clicking on "Settings" and then "About" -->
Your Rocket.Chat.Android version: (e.g. 2.1.0)
Your Rocket.Chat Server version: (e.g. 0.63.1-develop)
<!-- Found a bug? List all devices that reproduced it and all that doesn't -->
Mobile device model and OS version: (e.g. "Nexus 7 - Android 6.0.1")
## Additional context
<!-- Add any other context about the problem here. -->
---
name: Chore
about: Issues related to docs, workflow, dependency and others
---
## Describe the chore
<!-- A clear and concise description of what you want to do. -->
## Devices and Versions
<!-- Version can be found by opening the side menu and then clicking on "Settings" and then "About" -->
Your Rocket.Chat.Android version: (e.g. 2.1.0)
Your Rocket.Chat Server version: (e.g. 0.63.1-develop)
<!-- Found a bug? List all devices that reproduced it and all that doesn't -->
Mobile device model and OS version: (e.g. "Nexus 7 - Android 6.0.1")
---
name: Feature request
about: Suggest an idea for this project
---
## Describe the feature you'd like
<!-- A clear and concise description of what you want to happen. -->
## Devices and Versions
<!-- Version can be found by opening the side menu and then clicking on "Settings" and then "About" -->
Your Rocket.Chat.Android version: (e.g. 2.1.0)
Your Rocket.Chat Server version: (e.g. 0.63.1-develop)
<!-- Found a bug? List all devices that reproduced it and all that doesn't -->
Mobile device model and OS version: (e.g. "Nexus 7 - Android 6.0.1")
## Screenshots
<!-- Add screenshots to provide context or UI mockup. -->
## Additional context
<!-- Add any other context about the problem here. -->
...@@ -4,4 +4,6 @@ ...@@ -4,4 +4,6 @@
<!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below --> <!-- INSTRUCTION: Inform the issue number that this PR closes, or remove the line below -->
Closes #ISSUE_NUMBER Closes #ISSUE_NUMBER
<!-- INSTRUCTION: Tell us more about your PR with screen shots if you can --> #### Changes: [Add here what changes were made in this issue and if possible provide links.]
\ No newline at end of file
#### Screenshots or GIF for the change:
...@@ -16,7 +16,7 @@ android { ...@@ -16,7 +16,7 @@ android {
applicationId "chat.rocket.android" applicationId "chat.rocket.android"
minSdkVersion versions.minSdk minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk targetSdkVersion versions.targetSdk
versionCode 2054 versionCode 2055
versionName "3.2.0" versionName "3.2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true multiDexEnabled true
......
...@@ -123,6 +123,7 @@ class ChatRoomPresenter @Inject constructor( ...@@ -123,6 +123,7 @@ class ChatRoomPresenter @Inject constructor(
private var lastState = manager.state private var lastState = manager.state
private var typingStatusList = arrayListOf<String>() private var typingStatusList = arrayListOf<String>()
private val roomChangesChannel = Channel<Room>(Channel.CONFLATED) private val roomChangesChannel = Channel<Room>(Channel.CONFLATED)
private lateinit var draftKey: String
fun setupChatRoom( fun setupChatRoom(
roomId: String, roomId: String,
...@@ -130,12 +131,17 @@ class ChatRoomPresenter @Inject constructor( ...@@ -130,12 +131,17 @@ class ChatRoomPresenter @Inject constructor(
roomType: String, roomType: String,
chatRoomMessage: String? = null chatRoomMessage: String? = null
) { ) {
draftKey = "${currentServer}_${LocalRepository.DRAFT_KEY}$roomId"
chatRoomId = roomId
chatRoomType = roomType
launch(CommonPool + strategy.jobs) { launch(CommonPool + strategy.jobs) {
try { try {
chatRoles = if (roomTypeOf(roomType) !is RoomType.DirectMessage) { chatRoles = if (roomTypeOf(roomType) !is RoomType.DirectMessage) {
client.chatRoomRoles(roomType = roomTypeOf(roomType), roomName = roomName) client.chatRoomRoles(roomType = roomTypeOf(roomType), roomName = roomName)
} else emptyList() } else {
} catch (ex: RocketChatException) { emptyList()
}
} catch (ex: Exception) {
Timber.e(ex) Timber.e(ex)
chatRoles = emptyList() chatRoles = emptyList()
} finally { } finally {
...@@ -172,6 +178,7 @@ class ChatRoomPresenter @Inject constructor( ...@@ -172,6 +178,7 @@ class ChatRoomPresenter @Inject constructor(
} }
private suspend fun subscribeRoomChanges() { private suspend fun subscribeRoomChanges() {
withContext(CommonPool + strategy.jobs) {
chatRoomId?.let { chatRoomId?.let {
manager.addRoomChannel(it, roomChangesChannel) manager.addRoomChannel(it, roomChangesChannel)
for (room in roomChangesChannel) { for (room in roomChangesChannel) {
...@@ -181,6 +188,7 @@ class ChatRoomPresenter @Inject constructor( ...@@ -181,6 +188,7 @@ class ChatRoomPresenter @Inject constructor(
} }
} }
} }
}
private fun unsubscribeRoomChanges() { private fun unsubscribeRoomChanges() {
chatRoomId?.let { manager.removeRoomChannel(it) } chatRoomId?.let { manager.removeRoomChannel(it) }
...@@ -309,8 +317,8 @@ class ChatRoomPresenter @Inject constructor( ...@@ -309,8 +317,8 @@ class ChatRoomPresenter @Inject constructor(
launchUI(strategy) { launchUI(strategy) {
try { try {
// ignore message for now, will receive it on the stream // ignore message for now, will receive it on the stream
val id = UUID.randomUUID().toString()
if (messageId == null) { if (messageId == null) {
val id = UUID.randomUUID().toString()
val username = userHelper.username() val username = userHelper.username()
val newMessage = Message( val newMessage = Message(
id = id, id = id,
...@@ -363,12 +371,12 @@ class ChatRoomPresenter @Inject constructor( ...@@ -363,12 +371,12 @@ class ChatRoomPresenter @Inject constructor(
} else { } else {
client.updateMessage(chatRoomId, messageId, text) client.updateMessage(chatRoomId, messageId, text)
} }
clearDraftMessage()
view.enableSendMessageButton()
} catch (ex: Exception) { } catch (ex: Exception) {
Timber.d(ex, "Error sending message...") Timber.e(ex, "Error sending message...")
jobSchedulerInteractor.scheduleSendingMessages() jobSchedulerInteractor.scheduleSendingMessages()
} finally { } finally {
view.clearMessageComposition(true)
view.enableSendMessageButton() view.enableSendMessageButton()
} }
} }
...@@ -909,7 +917,7 @@ class ChatRoomPresenter @Inject constructor( ...@@ -909,7 +917,7 @@ class ChatRoomPresenter @Inject constructor(
navigator.toChatDetails(chatRoomId, chatRoomType, isSubscribed, isMenuDisabled) navigator.toChatDetails(chatRoomId, chatRoomType, isSubscribed, isMenuDisabled)
} }
fun loadChatRooms() { fun loadChatRoomsSuggestions() {
launchUI(strategy) { launchUI(strategy) {
try { try {
val chatRooms = getChatRoomsAsync() val chatRooms = getChatRoomsAsync()
...@@ -1259,7 +1267,6 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1259,7 +1267,6 @@ class ChatRoomPresenter @Inject constructor(
roles = chatRoles, isBroadcast = chatIsBroadcast, isRoom = true roles = chatRoles, isBroadcast = chatIsBroadcast, isRoom = true
) )
) )
val roomMessages = messagesRepository.getByRoomId(streamedMessage.roomId) val roomMessages = messagesRepository.getByRoomId(streamedMessage.roomId)
val index = roomMessages.indexOfFirst { msg -> msg.id == streamedMessage.id } val index = roomMessages.indexOfFirst { msg -> msg.id == streamedMessage.id }
if (index > -1) { if (index > -1) {
...@@ -1281,31 +1288,26 @@ class ChatRoomPresenter @Inject constructor( ...@@ -1281,31 +1288,26 @@ class ChatRoomPresenter @Inject constructor(
} }
/** /**
* Save unfinished message, when user left chat room without sending a message. It also clears * Save unfinished message, when user left chat room without sending a message.
* saved message from local repository when unfinishedMessage is blank.
* *
* @param chatRoomId Chat room Id.
* @param unfinishedMessage The unfinished message to save. * @param unfinishedMessage The unfinished message to save.
*/ */
fun saveUnfinishedMessage(chatRoomId: String, unfinishedMessage: String) { fun saveDraftMessage(unfinishedMessage: String) {
val key = "${currentServer}_${LocalRepository.UNFINISHED_MSG_KEY}$chatRoomId"
if (unfinishedMessage.isNotBlank()) { if (unfinishedMessage.isNotBlank()) {
localRepository.save(key, unfinishedMessage) localRepository.save(draftKey, unfinishedMessage)
} else {
localRepository.clear(key)
} }
} }
fun clearDraftMessage() {
localRepository.clear(draftKey)
}
/** /**
* Get unfinished message from local repository, when user left chat room without * Get unfinished message from local repository, when user left chat room without
* sending a message and now the user is back. * sending a message and now the user is back.
* *
* @param chatRoomId Chat room Id. * @return Returns the unfinished message, null otherwise.
*
* @return Returns the unfinished message.
*/ */
fun getUnfinishedMessage(chatRoomId: String): String { fun getDraftUnfinishedMessage(): String? {
val key = "${currentServer}_${LocalRepository.UNFINISHED_MSG_KEY}$chatRoomId" return localRepository.get(draftKey)
return localRepository.get(key) ?: ""
} }
} }
...@@ -6,7 +6,6 @@ import android.content.ClipData ...@@ -6,7 +6,6 @@ import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.res.Configuration
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
...@@ -19,7 +18,6 @@ import android.view.Menu ...@@ -19,7 +18,6 @@ import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Button
import android.widget.EditText import android.widget.EditText
import android.widget.FrameLayout import android.widget.FrameLayout
import android.widget.ImageView import android.widget.ImageView
...@@ -70,12 +68,12 @@ import chat.rocket.android.helper.MessageParser ...@@ -70,12 +68,12 @@ import chat.rocket.android.helper.MessageParser
import chat.rocket.android.util.extension.asObservable import chat.rocket.android.util.extension.asObservable
import chat.rocket.android.util.extension.createImageFile import chat.rocket.android.util.extension.createImageFile
import chat.rocket.android.util.extensions.circularRevealOrUnreveal import chat.rocket.android.util.extensions.circularRevealOrUnreveal
import chat.rocket.android.util.extensions.content
import chat.rocket.android.util.extensions.fadeIn import chat.rocket.android.util.extensions.fadeIn
import chat.rocket.android.util.extensions.fadeOut import chat.rocket.android.util.extensions.fadeOut
import chat.rocket.android.util.extensions.getBitmpap import chat.rocket.android.util.extensions.getBitmpap
import chat.rocket.android.util.extensions.hideKeyboard import chat.rocket.android.util.extensions.hideKeyboard
import chat.rocket.android.util.extensions.inflate import chat.rocket.android.util.extensions.inflate
import chat.rocket.android.util.extensions.isNotNullNorEmpty
import chat.rocket.android.util.extensions.rotateBy import chat.rocket.android.util.extensions.rotateBy
import chat.rocket.android.util.extensions.showToast import chat.rocket.android.util.extensions.showToast
import chat.rocket.android.util.extensions.textContent import chat.rocket.android.util.extensions.textContent
...@@ -177,6 +175,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -177,6 +175,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
internal var isSearchTermQueried = false internal var isSearchTermQueried = false
private val dismissStatus = { text_connection_status.fadeOut() }
// For reveal and unreveal anim. // For reveal and unreveal anim.
private val hypotenuse by lazy { private val hypotenuse by lazy {
Math.hypot( Math.hypot(
...@@ -205,6 +205,65 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -205,6 +205,65 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
internal val textFile by lazy { dialogView.findViewById<TextView>(R.id.text_file_name) } internal val textFile by lazy { dialogView.findViewById<TextView>(R.id.text_file_name) }
private var takenPhotoUri: Uri? = null private var takenPhotoUri: Uri? = null
private val layoutChangeListener =
View.OnLayoutChangeListener { _, _, _, _, bottom, _, _, _, oldBottom ->
val y = oldBottom - bottom
if (Math.abs(y) > 0 && isAdded) {
// if y is positive the keyboard is up else it's down
recycler_view.post {
if (y > 0 || Math.abs(verticalScrollOffset.get()) >= Math.abs(y)) {
ui { recycler_view.scrollBy(0, y) }
} else {
ui { recycler_view.scrollBy(0, verticalScrollOffset.get()) }
}
}
}
}
private lateinit var endlessRecyclerViewScrollListener: EndlessRecyclerViewScrollListener
private val onScrollListener = object : RecyclerView.OnScrollListener() {
var state = AtomicInteger(RecyclerView.SCROLL_STATE_IDLE)
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
state.compareAndSet(RecyclerView.SCROLL_STATE_IDLE, newState)
when (newState) {
RecyclerView.SCROLL_STATE_IDLE -> {
if (!state.compareAndSet(RecyclerView.SCROLL_STATE_SETTLING, newState)) {
state.compareAndSet(RecyclerView.SCROLL_STATE_DRAGGING, newState)
}
}
RecyclerView.SCROLL_STATE_DRAGGING -> {
state.compareAndSet(RecyclerView.SCROLL_STATE_IDLE, newState)
}
RecyclerView.SCROLL_STATE_SETTLING -> {
state.compareAndSet(RecyclerView.SCROLL_STATE_DRAGGING, newState)
}
}
}
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if (state.get() != RecyclerView.SCROLL_STATE_IDLE) {
verticalScrollOffset.getAndAdd(dy)
}
}
}
private val fabScrollListener = object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if (!recyclerView.canScrollVertically(1)) {
text_count.isVisible = false
button_fab.hide()
newMessageCount = 0
} else {
if (dy < 0 && !button_fab.isVisible) {
button_fab.show()
if (newMessageCount != 0) text_count.isVisible = true
}
}
}
}
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
AndroidSupportInjection.inject(this) AndroidSupportInjection.inject(this)
...@@ -232,24 +291,23 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -232,24 +291,23 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
inflater: LayoutInflater, inflater: LayoutInflater,
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle? savedInstanceState: Bundle?
): View? { ): View? = container?.inflate(R.layout.fragment_chat_room)
return container?.inflate(R.layout.fragment_chat_room)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
setupToolbar(chatRoomName) setupToolbar(chatRoomName)
presenter.setupChatRoom(chatRoomId, chatRoomName, chatRoomType, chatRoomMessage) presenter.setupChatRoom(chatRoomId, chatRoomName, chatRoomType, chatRoomMessage)
presenter.loadChatRooms() presenter.loadChatRoomsSuggestions()
setupRecyclerView() setupRecyclerView()
setupFab() setupFab()
setupSuggestionsView() setupSuggestionsView()
setupActionSnackbar() setupActionSnackbar()
(activity as ChatRoomActivity).let { with(activity as ChatRoomActivity) {
it.showToolbarTitle(chatRoomName) showToolbarTitle(chatRoomName)
it.showToolbarChatRoomIcon(chatRoomType) showToolbarChatRoomIcon(chatRoomType)
} }
getDraftMessage()
analyticsManager.logScreenView(ScreenViewEvent.ChatRoom) analyticsManager.logScreenView(ScreenViewEvent.ChatRoom)
} }
...@@ -264,15 +322,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -264,15 +322,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
recycler_view.removeOnScrollListener(onScrollListener) recycler_view.removeOnScrollListener(onScrollListener)
recycler_view.removeOnLayoutChangeListener(layoutChangeListener) recycler_view.removeOnLayoutChangeListener(layoutChangeListener)
presenter.disconnect() presenter.saveDraftMessage(text_message.text.toString())
presenter.saveUnfinishedMessage(chatRoomId, text_message.text.toString())
handler.removeCallbacksAndMessages(null) handler.removeCallbacksAndMessages(null)
unsubscribeComposeTextMessage() unsubscribeComposeTextMessage()
presenter.disconnect()
// Hides the keyboard (if it's opened) before going to any view. // Hides the keyboard (if it's opened) before going to any view.
activity?.apply { activity?.apply { hideKeyboard() }
hideKeyboard()
}
super.onDestroyView() super.onDestroyView()
} }
...@@ -282,15 +338,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -282,15 +338,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
activity?.invalidateOptionsMenu() activity?.invalidateOptionsMenu()
} }
fun dismissEmojiKeyboard() {
// Check if the keyboard was ever initialized.
// It may be the case when you are looking a not joined room
if (::emojiKeyboardPopup.isInitialized) {
emojiKeyboardPopup.dismiss()
setReactionButtonIcon(R.drawable.ic_reaction_24dp)
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
when (requestCode) { when (requestCode) {
...@@ -389,6 +436,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -389,6 +436,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
presenter.loadActiveMembers(chatRoomId, chatRoomType, filterSelfOut = true) presenter.loadActiveMembers(chatRoomId, chatRoomType, filterSelfOut = true)
empty_chat_view.isVisible = adapter.itemCount == 0 empty_chat_view.isVisible = adapter.itemCount == 0
dismissEmojiKeyboard()
} }
} }
...@@ -397,6 +445,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -397,6 +445,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
adapter.clearData() adapter.clearData()
adapter.prependData(dataSet) adapter.prependData(dataSet)
empty_chat_view.isVisible = adapter.itemCount == 0 empty_chat_view.isVisible = adapter.itemCount == 0
dismissEmojiKeyboard()
} }
override fun onRoomUpdated(roomUiModel: RoomUiModel) { override fun onRoomUpdated(roomUiModel: RoomUiModel) {
...@@ -413,64 +462,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -413,64 +462,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
} }
private val layoutChangeListener =
View.OnLayoutChangeListener { _, _, _, _, bottom, _, _, _, oldBottom ->
val y = oldBottom - bottom
if (Math.abs(y) > 0 && isAdded) {
// if y is positive the keyboard is up else it's down
recycler_view.post {
if (y > 0 || Math.abs(verticalScrollOffset.get()) >= Math.abs(y)) {
ui { recycler_view.scrollBy(0, y) }
} else {
ui { recycler_view.scrollBy(0, verticalScrollOffset.get()) }
}
}
}
}
private lateinit var endlessRecyclerViewScrollListener: EndlessRecyclerViewScrollListener
private val onScrollListener = object : RecyclerView.OnScrollListener() {
var state = AtomicInteger(RecyclerView.SCROLL_STATE_IDLE)
override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
state.compareAndSet(RecyclerView.SCROLL_STATE_IDLE, newState)
when (newState) {
RecyclerView.SCROLL_STATE_IDLE -> {
if (!state.compareAndSet(RecyclerView.SCROLL_STATE_SETTLING, newState)) {
state.compareAndSet(RecyclerView.SCROLL_STATE_DRAGGING, newState)
}
}
RecyclerView.SCROLL_STATE_DRAGGING -> {
state.compareAndSet(RecyclerView.SCROLL_STATE_IDLE, newState)
}
RecyclerView.SCROLL_STATE_SETTLING -> {
state.compareAndSet(RecyclerView.SCROLL_STATE_DRAGGING, newState)
}
}
}
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if (state.get() != RecyclerView.SCROLL_STATE_IDLE) {
verticalScrollOffset.getAndAdd(dy)
}
}
}
private val fabScrollListener = object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
if (!recyclerView.canScrollVertically(1)) {
text_count.isVisible = false
button_fab.hide()
newMessageCount = 0
} else {
if (dy < 0 && !button_fab.isVisible) {
button_fab.show()
if (newMessageCount != 0) text_count.isVisible = true
}
}
}
}
override fun sendMessage(text: String) { override fun sendMessage(text: String) {
ui { ui {
...@@ -505,38 +496,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -505,38 +496,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
override fun hideTypingStatusView() { override fun hideTypingStatusView() {
ui { ui { text_typing_status.isVisible = false }
text_typing_status.isVisible = false
}
} }
override fun showInvalidFileMessage() { override fun showInvalidFileMessage() {
showMessage(getString(R.string.msg_invalid_file)) showMessage(getString(R.string.msg_invalid_file))
} }
override fun showNewMessage(message: List<BaseUiModel<*>>, isMessageReceived: Boolean) {
ui {
adapter.prependData(message)
if (isMessageReceived && button_fab.isVisible) {
newMessageCount++
if (newMessageCount <= 99)
text_count.text = newMessageCount.toString()
else
text_count.text = "99+"
text_count.isVisible = true
} else if (!button_fab.isVisible)
recycler_view.scrollToPosition(0)
verticalScrollOffset.set(0)
empty_chat_view.isVisible = adapter.itemCount == 0
}
}
override fun disableSendMessageButton() { override fun disableSendMessageButton() {
ui { ui { button_send.isEnabled = false }
button_send.isEnabled = false
}
} }
override fun enableSendMessageButton() { override fun enableSendMessageButton() {
...@@ -558,6 +526,28 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -558,6 +526,28 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
} }
override fun showNewMessage(message: List<BaseUiModel<*>>, isMessageReceived: Boolean) {
ui {
adapter.prependData(message)
if (isMessageReceived && button_fab.isVisible) {
newMessageCount++
if (newMessageCount <= 99) {
text_count.text = newMessageCount.toString()
} else {
text_count.text = "99+"
}
text_count.isVisible = true
}
else if (!button_fab.isVisible) {
recycler_view.scrollToPosition(0)
}
verticalScrollOffset.set(0)
empty_chat_view.isVisible = adapter.itemCount == 0
dismissEmojiKeyboard()
}
}
override fun dispatchUpdateMessage(index: Int, message: List<BaseUiModel<*>>) { override fun dispatchUpdateMessage(index: Int, message: List<BaseUiModel<*>>) {
ui { ui {
// TODO - investigate WHY we get a empty list here // TODO - investigate WHY we get a empty list here
...@@ -570,6 +560,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -570,6 +560,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} else { } else {
showNewMessage(message, true) showNewMessage(message, true)
} }
dismissEmojiKeyboard()
} }
} }
...@@ -737,8 +728,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -737,8 +728,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
private fun setReactionButtonIcon(@DrawableRes drawableId: Int) { private fun setReactionButtonIcon(@DrawableRes drawableId: Int) {
button_add_reaction.setImageResource(drawableId) button_add_reaction_or_show_keyboard.setImageResource(drawableId)
button_add_reaction.tag = drawableId button_add_reaction_or_show_keyboard.tag = drawableId
} }
override fun showFileSelection(filter: Array<String>?) { override fun showFileSelection(filter: Array<String>?) {
...@@ -792,10 +783,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -792,10 +783,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
} }
private val dismissStatus = {
text_connection_status.fadeOut()
}
private fun setupRecyclerView() { private fun setupRecyclerView() {
// Initialize the endlessRecyclerViewScrollListener so we don't NPE at onDestroyView // Initialize the endlessRecyclerViewScrollListener so we don't NPE at onDestroyView
val linearLayoutManager = LinearLayoutManager(context, RecyclerView.VERTICAL, true) val linearLayoutManager = LinearLayoutManager(context, RecyclerView.VERTICAL, true)
...@@ -859,9 +846,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -859,9 +846,13 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
subscribeComposeTextMessage() subscribeComposeTextMessage()
emojiKeyboardPopup = EmojiKeyboardPopup(activity!!, activity!!.findViewById(R.id.fragment_container)) emojiKeyboardPopup = EmojiKeyboardPopup(activity!!, activity!!.findViewById(R.id.fragment_container))
emojiKeyboardPopup.listener = this emojiKeyboardPopup.listener = this
text_message.listener = object : ComposerEditText.ComposerEditTextListener { text_message.listener = object : ComposerEditText.ComposerEditTextListener {
override fun onKeyboardOpened() {} override fun onKeyboardOpened() {
KeyboardHelper.showSoftKeyboard(text_message)
}
override fun onKeyboardClosed() { override fun onKeyboardClosed() {
activity?.let { activity?.let {
...@@ -878,7 +869,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -878,7 +869,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
var textMessage = citation ?: "" var textMessage = citation ?: ""
textMessage += text_message.textContent textMessage += text_message.textContent
sendMessage(textMessage) sendMessage(textMessage)
clearMessageComposition(true)
} }
button_show_attachment_options.setOnClickListener { button_show_attachment_options.setOnClickListener {
...@@ -893,9 +883,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -893,9 +883,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
hideAttachmentOptions() hideAttachmentOptions()
} }
button_add_reaction.setOnClickListener { _ -> button_add_reaction_or_show_keyboard.setOnClickListener { toggleKeyboard() }
openEmojiKeyboardPopup()
}
button_take_a_photo.setOnClickListener { button_take_a_photo.setOnClickListener {
dispatchTakePictureIntent() dispatchTakePictureIntent()
...@@ -952,16 +940,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -952,16 +940,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
} }
private fun getUnfinishedMessage() { private fun getDraftMessage() {
val unfinishedMessage = presenter.getUnfinishedMessage(chatRoomId) val unfinishedMessage = presenter.getDraftUnfinishedMessage()
if (unfinishedMessage.isNotBlank()) { if (unfinishedMessage.isNotNullNorEmpty()) {
text_message.setText(unfinishedMessage) text_message.setText(unfinishedMessage)
val orientation = resources.configuration.orientation
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
KeyboardHelper.showSoftKeyboard(text_message)
} else {
//TODO show keyboard in full screen mode when landscape orientation
}
} }
} }
...@@ -979,7 +961,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -979,7 +961,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
} }
.addSuggestionProviderAction("#") { query -> .addSuggestionProviderAction("#") { query ->
if (query.isNotEmpty()) { if (query.isNotEmpty()) {
presenter.loadChatRooms() presenter.loadChatRoomsSuggestions()
} }
} }
.addSuggestionProviderAction("/") { .addSuggestionProviderAction("/") {
...@@ -993,19 +975,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -993,19 +975,10 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
presenter.loadCommands() presenter.loadCommands()
} }
private fun openEmojiKeyboardPopup() { // Shows the emoji or the system keyboard.
private fun toggleKeyboard() {
if (!emojiKeyboardPopup.isShowing) { if (!emojiKeyboardPopup.isShowing) {
// If keyboard is visible, simply show the popup openEmojiKeyboard()
if (emojiKeyboardPopup.isKeyboardOpen) {
emojiKeyboardPopup.showAtBottom()
} else {
// Open the text keyboard first and immediately after that show the emoji popup
text_message.isFocusableInTouchMode = true
text_message.requestFocus()
emojiKeyboardPopup.showAtBottomPending()
KeyboardHelper.showSoftKeyboard(text_message)
}
setReactionButtonIcon(R.drawable.ic_keyboard_black_24dp)
} else { } else {
// If popup is showing, simply dismiss it to show the underlying text keyboard // If popup is showing, simply dismiss it to show the underlying text keyboard
dismissEmojiKeyboard() dismissEmojiKeyboard()
...@@ -1172,4 +1145,27 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -1172,4 +1145,27 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
presenter.reportMessage(messageId = id, presenter.reportMessage(messageId = id,
description = "This message was reported by a user from the Android app") description = "This message was reported by a user from the Android app")
} }
fun openEmojiKeyboard() {
// If keyboard is visible, simply show the popup
if (emojiKeyboardPopup.isKeyboardOpen) {
emojiKeyboardPopup.showAtBottom()
} else {
// Open the text keyboard first and immediately after that show the emoji popup
text_message.isFocusableInTouchMode = true
text_message.requestFocus()
emojiKeyboardPopup.showAtBottomPending()
KeyboardHelper.showSoftKeyboard(text_message)
}
setReactionButtonIcon(R.drawable.ic_keyboard_black_24dp)
}
fun dismissEmojiKeyboard() {
// Check if the keyboard was ever initialized.
// It may be the case when you are looking a not joined room
if (::emojiKeyboardPopup.isInitialized) {
emojiKeyboardPopup.dismiss()
setReactionButtonIcon(R.drawable.ic_reaction_24dp)
}
}
} }
...@@ -168,7 +168,7 @@ class UiModelMapper @Inject constructor( ...@@ -168,7 +168,7 @@ class UiModelMapper @Inject constructor(
// TODO: move this to new interactor or FetchChatRoomsInteractor? // TODO: move this to new interactor or FetchChatRoomsInteractor?
private suspend fun getChatRoomAsync(roomId: String): ChatRoom? = withContext(CommonPool) { private suspend fun getChatRoomAsync(roomId: String): ChatRoom? = withContext(CommonPool) {
return@withContext dbManager.chatRoomDao().getSync(roomId)?.let { return@withContext dbManager.getRoom(id = roomId)?.let {
with(it.chatRoom) { with(it.chatRoom) {
ChatRoom( ChatRoom(
id = id, id = id,
......
...@@ -239,7 +239,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView { ...@@ -239,7 +239,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
AlertDialog.Builder(context) AlertDialog.Builder(context)
.setTitle(R.string.dialog_sort_title) .setTitle(R.string.dialog_sort_title)
.setView(dialogLayout) .setView(dialogLayout)
.setPositiveButton(R.string.dialog_button_done) { dialog, _ -> .setPositiveButton(R.string.msg_sort) { dialog, _ ->
invalidateQueryOnSearch() invalidateQueryOnSearch()
updateSort() updateSort()
dialog.dismiss() dialog.dismiss()
......
...@@ -27,7 +27,7 @@ interface LocalRepository { ...@@ -27,7 +27,7 @@ interface LocalRepository {
const val SETTINGS_KEY = "settings_" const val SETTINGS_KEY = "settings_"
const val PERMISSIONS_KEY = "permissions_" const val PERMISSIONS_KEY = "permissions_"
const val USER_KEY = "user_" const val USER_KEY = "user_"
const val UNFINISHED_MSG_KEY = "unfinished_msg_" const val DRAFT_KEY = "draft"
const val CURRENT_USERNAME_KEY = "username_" const val CURRENT_USERNAME_KEY = "username_"
const val LAST_CHATROOMS_REFRESH = "_chatrooms_refresh" const val LAST_CHATROOMS_REFRESH = "_chatrooms_refresh"
} }
......
...@@ -8,6 +8,7 @@ import chat.rocket.android.server.infraestructure.RocketChatClientFactory ...@@ -8,6 +8,7 @@ import chat.rocket.android.server.infraestructure.RocketChatClientFactory
import chat.rocket.android.util.extension.launchUI import chat.rocket.android.util.extension.launchUI
import chat.rocket.android.util.retryIO import chat.rocket.android.util.retryIO
import chat.rocket.common.RocketChatException import chat.rocket.common.RocketChatException
import chat.rocket.common.util.ifNull
import chat.rocket.core.RocketChatClient import chat.rocket.core.RocketChatClient
import chat.rocket.core.internal.rest.updateProfile import chat.rocket.core.internal.rest.updateProfile
import javax.inject.Inject import javax.inject.Inject
...@@ -36,7 +37,9 @@ class PasswordPresenter @Inject constructor( ...@@ -36,7 +37,9 @@ class PasswordPresenter @Inject constructor(
} }
} catch (exception: RocketChatException) { } catch (exception: RocketChatException) {
analyticsManager.logResetPassword(false) analyticsManager.logResetPassword(false)
view.showPasswordFailsUpdateMessage(exception.message) exception.message?.let { errorMessage ->
view.showPasswordFailsUpdateMessage(errorMessage)
}
} finally { } finally {
view.hideLoading() view.hideLoading()
} }
......
...@@ -12,5 +12,5 @@ interface PasswordView: LoadingView { ...@@ -12,5 +12,5 @@ interface PasswordView: LoadingView {
* Shows a message when the user's password fails to update * Shows a message when the user's password fails to update
* @param error is a String containing the failure message * @param error is a String containing the failure message
*/ */
fun showPasswordFailsUpdateMessage(error : String?) fun showPasswordFailsUpdateMessage(error : String)
} }
...@@ -96,7 +96,7 @@ class PasswordFragment : Fragment(), PasswordView, ActionMode.Callback { ...@@ -96,7 +96,7 @@ class PasswordFragment : Fragment(), PasswordView, ActionMode.Callback {
} }
} }
override fun showPasswordFailsUpdateMessage(error: String?) { override fun showPasswordFailsUpdateMessage(error: String) {
showToast(getString(R.string.msg_unable_to_update_password, error)) showToast(getString(R.string.msg_unable_to_update_password, error))
} }
......
package chat.rocket.android.userdetails.presentation package chat.rocket.android.userdetails.presentation
import chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import chat.rocket.android.core.lifecycle.CancelStrategy import chat.rocket.android.core.lifecycle.CancelStrategy
import chat.rocket.android.db.DatabaseManager import chat.rocket.android.db.DatabaseManager
import chat.rocket.android.db.model.ChatRoomEntity
import chat.rocket.android.server.domain.GetConnectingServerInteractor import chat.rocket.android.server.domain.GetConnectingServerInteractor
import chat.rocket.android.server.infraestructure.ConnectionManagerFactory import chat.rocket.android.server.infraestructure.ConnectionManagerFactory
import chat.rocket.android.util.extension.launchUI import chat.rocket.android.util.extension.launchUI
...@@ -27,6 +29,7 @@ class UserDetailsPresenter @Inject constructor( ...@@ -27,6 +29,7 @@ class UserDetailsPresenter @Inject constructor(
private var currentServer = serverInteractor.get()!! private var currentServer = serverInteractor.get()!!
private val manager = factory.create(currentServer) private val manager = factory.create(currentServer)
private val client = manager.client private val client = manager.client
private val interactor = FetchChatRoomsInteractor(client,dbManager)
fun loadUserDetails(userId: String) { fun loadUserDetails(userId: String) {
launchUI(strategy) { launchUI(strategy) {
...@@ -39,37 +42,7 @@ class UserDetailsPresenter @Inject constructor( ...@@ -39,37 +42,7 @@ class UserDetailsPresenter @Inject constructor(
val openedChatRooms = chatRoomByName(name = u.name) val openedChatRooms = chatRoomByName(name = u.name)
val avatarUrl = u.username?.let { currentServer.avatarUrl(avatar = it) } val avatarUrl = u.username?.let { currentServer.avatarUrl(avatar = it) }
val chatRoom: ChatRoom? = if (openedChatRooms.isEmpty()) { val chatRoom: ChatRoom? = openedChatRooms.firstOrNull()
ChatRoom(
id = "",
type = roomTypeOf(RoomType.DIRECT_MESSAGE),
name = u.username ?: u.name.orEmpty(),
fullName = u.name,
favorite = false,
open = false,
alert = false,
status = userStatusOf(u.status),
client = client,
broadcast = false,
archived = false,
default = false,
description = null,
groupMentions = null,
userMentions = null,
lastMessage = null,
lastSeen = null,
topic = null,
announcement = null,
roles = null,
unread = 0,
readonly = false,
muted = null,
subscriptionId = "",
timestamp = null,
updatedAt = null,
user = null
)
} else openedChatRooms.firstOrNull()
view.showUserDetails( view.showUserDetails(
avatarUrl = avatarUrl, avatarUrl = avatarUrl,
...@@ -92,13 +65,14 @@ class UserDetailsPresenter @Inject constructor( ...@@ -92,13 +65,14 @@ class UserDetailsPresenter @Inject constructor(
client.createDirectMessage(username = id) client.createDirectMessage(username = id)
} }
interactor.refreshChatRooms()
val userEntity = withContext(CommonPool) { val userEntity = withContext(CommonPool) {
dbManager.userDao().getUser(id = id) dbManager.userDao().getUser(id = id)
} }
if (userEntity != null) { if (userEntity != null) {
view.toDirectMessage( val chatRoom = ChatRoom(
chatRoom = ChatRoom(
id = result.id, id = result.id,
type = roomTypeOf(RoomType.DIRECT_MESSAGE), type = roomTypeOf(RoomType.DIRECT_MESSAGE),
name = userEntity.username ?: userEntity.name.orEmpty(), name = userEntity.username ?: userEntity.name.orEmpty(),
...@@ -127,13 +101,27 @@ class UserDetailsPresenter @Inject constructor( ...@@ -127,13 +101,27 @@ class UserDetailsPresenter @Inject constructor(
updatedAt = result.updatedAt, updatedAt = result.updatedAt,
user = null user = null
) )
)
withContext(CommonPool + strategy.jobs) {
dbManager.chatRoomDao().insertOrReplace(chatRoom = ChatRoomEntity(
id = chatRoom.id,
name = chatRoom.name,
description = chatRoom.description,
type = chatRoom.type.toString(),
fullname = chatRoom.fullName,
subscriptionId = chatRoom.subscriptionId,
updatedAt = chatRoom.updatedAt
))
}
view.toDirectMessage(chatRoom = chatRoom)
} }
} catch (ex: Exception) { } catch (ex: Exception) {
Timber.e(ex) Timber.e(ex)
view.onOpenDirectMessageError() view.onOpenDirectMessageError()
} }
} }
private suspend fun chatRoomByName(name: String? = null): List<ChatRoom> = withContext(CommonPool) { private suspend fun chatRoomByName(name: String? = null): List<ChatRoom> = withContext(CommonPool) {
return@withContext dbManager.chatRoomDao().getAllSync().filter { return@withContext dbManager.chatRoomDao().getAllSync().filter {
if (name == null) { if (name == null) {
......
...@@ -9,7 +9,7 @@ import timber.log.Timber ...@@ -9,7 +9,7 @@ import timber.log.Timber
import kotlin.coroutines.experimental.coroutineContext import kotlin.coroutines.experimental.coroutineContext
const val DEFAULT_RETRY = 3 const val DEFAULT_RETRY = 3
private const val DEFAULT_DB_RETRY = 5 private const val DEFAULT_DB_RETRY = 15
suspend fun <T> retryIO( suspend fun <T> retryIO(
description: String = "<missing description>", description: String = "<missing description>",
...@@ -42,7 +42,7 @@ suspend fun <T> retryDB( ...@@ -42,7 +42,7 @@ suspend fun <T> retryDB(
description: String = "<missing description>", description: String = "<missing description>",
times: Int = DEFAULT_DB_RETRY, times: Int = DEFAULT_DB_RETRY,
initialDelay: Long = 100, // 0.1 second initialDelay: Long = 100, // 0.1 second
maxDelay: Long = 500, // 0.5 second maxDelay: Long = 1500, // 1.5 second
factor: Double = 1.2, factor: Double = 1.2,
block: suspend () -> T): T block: suspend () -> T): T
{ {
......
...@@ -7,13 +7,7 @@ ...@@ -7,13 +7,7 @@
<path <path
android:fillColor="#000000" android:fillColor="#000000"
android:pathData="M20,5 L4,5 C2.9,5,2.01,5.9,2.01,7 L2,17 C2,18.1,2.9,19,4,19 L20,19 android:pathData="M20,5 L4,5 C2.9,5,2.01,5.9,2.01,7 L2,17 C2,18.1,2.9,19,4,19 L20,19 C21.1,19,22,18.1,22,17 L22,7 C22,5.9,21.1,5,20,5 Z M11,8 L13,8 L13,10 L11,10 L11,8 Z M11,11 L13,11 L13,13 L11,13 L11,11 Z M8,8 L10,8 L10,10 L8,10 L8,8 Z M8,11 L10,11 L10,13 L8,13 L8,11 Z M7,13 L5,13 L5,11 L7,11 L7,13 Z M7,10 L5,10 L5,8 L7,8 L7,10 Z M16,17 L8,17 L8,15 L16,15 L16,17 Z M16,13 L14,13 L14,11 L16,11 L16,13 Z M16,10 L14,10 L14,8 L16,8 L16,10 Z M19,13 L17,13 L17,11 L19,11 L19,13 Z M19,10 L17,10 L17,8 L19,8 L19,10 Z" />
C21.1,19,22,18.1,22,17 L22,7 C22,5.9,21.1,5,20,5 Z M11,8 L13,8 L13,10 L11,10
L11,8 Z M11,11 L13,11 L13,13 L11,13 L11,11 Z M8,8 L10,8 L10,10 L8,10 L8,8 Z <path android:pathData="M0,0 L24,0 L24,24 L0,24 Z M-24,0 L0,0 L0,24 L0,24 Z" />
M8,11 L10,11 L10,13 L8,13 L8,11 Z M7,13 L5,13 L5,11 L7,11 L7,13 Z M7,10 L5,10
L5,8 L7,8 L7,10 Z M16,17 L8,17 L8,15 L16,15 L16,17 Z M16,13 L14,13 L14,11 L16,11
L16,13 Z M16,10 L14,10 L14,8 L16,8 L16,10 Z M19,13 L17,13 L17,11 L19,11 L19,13 Z
M19,10 L17,10 L17,8 L19,8 L19,10 Z" />
<path
android:pathData="M0,0 L24,0 L24,24 L0,24 Z M-24,0 L0,0 L0,24 L0,24 Z" />
</vector> </vector>
\ No newline at end of file
...@@ -59,13 +59,12 @@ ...@@ -59,13 +59,12 @@
app:layout_constraintTop_toBottomOf="@+id/divider"> app:layout_constraintTop_toBottomOf="@+id/divider">
<ImageButton <ImageButton
android:id="@+id/button_add_reaction" android:id="@+id/button_add_reaction_or_show_keyboard"
android:layout_width="32dp" android:layout_width="32dp"
android:layout_height="32dp" android:layout_height="32dp"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/msg_content_description_show_attachment_options"
android:src="@drawable/ic_reaction_24dp" /> android:src="@drawable/ic_reaction_24dp" />
<chat.rocket.android.emoji.ComposerEditText <chat.rocket.android.emoji.ComposerEditText
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<item <item
android:id="@+id/action_sort" android:id="@+id/action_sort"
android:icon="@drawable/ic_sort" android:icon="@drawable/ic_sort"
android:title="@string/menu_chatroom_sort" android:title="@string/msg_sort"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
</menu> </menu>
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<string name="msg_send">Sende</string> <string name="msg_send">Sende</string>
<string name="msg_sent_attachment">Sende Anhang</string> <string name="msg_sent_attachment">Sende Anhang</string>
<string name="msg_welcome_to_rocket_chat">Willkommen bei Rocket.Chat</string> <string name="msg_welcome_to_rocket_chat">Willkommen bei Rocket.Chat</string>
<string name="msg_team_communication">Open Source-Kommunikation</string> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">Einloggen mit <b>e-mail</b></string> <string name="msg_login_with_email">Einloggen mit <b>e-mail</b></string>
<string name="msg_create_account">Ein Konto erstellen</string> <string name="msg_create_account">Ein Konto erstellen</string>
<string name="msg_continue_with_facebook">Weitermachen mit <b>Facebook</b></string> <string name="msg_continue_with_facebook">Weitermachen mit <b>Facebook</b></string>
...@@ -164,8 +164,8 @@ ...@@ -164,8 +164,8 @@
<string name="msg_unable_to_update_password">Unable to update password. Error message: %1$s</string> <!-- TODO - Add proper translation --> <string name="msg_unable_to_update_password">Unable to update password. Error message: %1$s</string> <!-- TODO - Add proper translation -->
<string name="msg_password_updated_successfully">Password updated successfully</string> <!-- TODO - Add proper translation --> <string name="msg_password_updated_successfully">Password updated successfully</string> <!-- TODO - Add proper translation -->
<plurals name="msg_reacted_with_"> <plurals name="msg_reacted_with_">
<item quantity="one">% 1 $ s reagierte mit% 2 $ s</item> <item quantity="one">%1$ s reagierte mit %2$s</item>
<item quantity="other">% 1 $ s reagierte mit% 2 $ s</item> <item quantity="other">%1$s reagierte mit %2$s</item>
</plurals> </plurals>
<!-- Create channel messages --> <!-- Create channel messages -->
...@@ -306,13 +306,12 @@ ...@@ -306,13 +306,12 @@
<string name="alert_title_default_skin_tone">Standart Hautton</string> <string name="alert_title_default_skin_tone">Standart Hautton</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Sortiere</string> <string name="msg_sort">Sortiere</string>
<string name="dialog_sort_title">Sortieren nach</string> <string name="dialog_sort_title">Sortieren nach</string>
<string name="dialog_sort_by_alphabet">Alphabetisch</string> <string name="dialog_sort_by_alphabet">Alphabetisch</string>
<string name="dialog_sort_by_activity">Aktivität</string> <string name="dialog_sort_by_activity">Aktivität</string>
<string name="dialog_group_by_type">Räume nach Typ</string> <string name="dialog_group_by_type">Räume nach Typ</string>
<string name="dialog_group_favourites">Räume nach Favoriten</string> <string name="dialog_group_favourites">Räume nach Favoriten</string>
<string name="dialog_button_done">Erledigt</string>
<string name="chatroom_header">Kopf</string> <string name="chatroom_header">Kopf</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<string name="msg_delete_description">Seguro que quieres borrar este mensaje</string> <string name="msg_delete_description">Seguro que quieres borrar este mensaje</string>
<string name="msg_no_search_found">No se han encontrado resultados</string> <string name="msg_no_search_found">No se han encontrado resultados</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation --> <string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation -->
<string name="msg_team_communication">Open Source Communication</string> <!-- TODO Add translation --> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation --> <string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation -->
<string name="msg_create_account">Create an account</string> <!-- TODO Add translation --> <string name="msg_create_account">Create an account</string> <!-- TODO Add translation -->
<string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation -->
...@@ -305,13 +305,12 @@ ...@@ -305,13 +305,12 @@
<string name="alert_title_default_skin_tone">Tono de piel predeterminado</string> <string name="alert_title_default_skin_tone">Tono de piel predeterminado</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Ordenar</string> <string name="msg_sort">Ordenar</string>
<string name="dialog_sort_title">Ordenar por</string> <string name="dialog_sort_title">Ordenar por</string>
<string name="dialog_sort_by_alphabet">Alfabético</string> <string name="dialog_sort_by_alphabet">Alfabético</string>
<string name="dialog_sort_by_activity">Actividad</string> <string name="dialog_sort_by_activity">Actividad</string>
<string name="dialog_group_by_type">Agrupar por tipo</string> <string name="dialog_group_by_type">Agrupar por tipo</string>
<string name="dialog_group_favourites">Agrupar favoritos</string> <string name="dialog_group_favourites">Agrupar favoritos</string>
<string name="dialog_button_done">Done</string><!-- TODO Add translation -->
<string name="chatroom_header">Cabezazo</string> <string name="chatroom_header">Cabezazo</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<string name="msg_delete_message">Supprimer Message</string> <string name="msg_delete_message">Supprimer Message</string>
<string name="msg_delete_description">Êtes-vous sûr de vouloir supprimer ce message</string> <string name="msg_delete_description">Êtes-vous sûr de vouloir supprimer ce message</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation --> <string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation -->
<string name="msg_team_communication">Open Source Communication</string> <!-- TODO Add translation --> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation --> <string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation -->
<string name="msg_create_account">Create an account</string> <!-- TODO Add translation --> <string name="msg_create_account">Create an account</string> <!-- TODO Add translation -->
<string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation -->
...@@ -310,13 +310,12 @@ ...@@ -310,13 +310,12 @@
<string name="alert_title_default_skin_tone">Tonalité de peau par défaut</string> <string name="alert_title_default_skin_tone">Tonalité de peau par défaut</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Trier</string> <string name="msg_sort">Trier</string>
<string name="dialog_sort_title">Trier par</string> <string name="dialog_sort_title">Trier par</string>
<string name="dialog_sort_by_alphabet">Alphabétique</string> <string name="dialog_sort_by_alphabet">Alphabétique</string>
<string name="dialog_sort_by_activity">Activité</string> <string name="dialog_sort_by_activity">Activité</string>
<string name="dialog_group_by_type">Grouper par type</string> <string name="dialog_group_by_type">Grouper par type</string>
<string name="dialog_group_favourites">Grouper favoris</string> <string name="dialog_group_favourites">Grouper favoris</string>
<string name="dialog_button_done">Ok</string>
<string name="chatroom_header">Entête</string> <string name="chatroom_header">Entête</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<string name="msg_delete_message">संदेश को हटाएं</string> <string name="msg_delete_message">संदेश को हटाएं</string>
<string name="msg_delete_description">क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं</string> <string name="msg_delete_description">क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं</string>
<string name="msg_welcome_to_rocket_chat">Rocket.Chat में आपका स्वागत है</string> <string name="msg_welcome_to_rocket_chat">Rocket.Chat में आपका स्वागत है</string>
<string name="msg_team_communication">ओपन सोर्स कम्युनिकेशन</string> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">ई-मेल के साथ लॉगिन करें</string> <string name="msg_login_with_email">ई-मेल के साथ लॉगिन करें</string>
<string name="msg_create_account">खाता बनाएं</string> <string name="msg_create_account">खाता बनाएं</string>
<string name="msg_continue_with_facebook"><b>Facebook</b> के साथ जारी रखें</string> <string name="msg_continue_with_facebook"><b>Facebook</b> के साथ जारी रखें</string>
...@@ -184,12 +184,12 @@ ...@@ -184,12 +184,12 @@
<string name="msg_no_topic">कोई विषय नहीं जोड़ा गया</string> <string name="msg_no_topic">कोई विषय नहीं जोड़ा गया</string>
<string name="msg_no_announcement">कोई घोषणा नहीं जोड़ा गया</string> <string name="msg_no_announcement">कोई घोषणा नहीं जोड़ा गया</string>
<string name="msg_no_description">कोई विवरण नहीं जोड़ा गया</string> <string name="msg_no_description">कोई विवरण नहीं जोड़ा गया</string>
<string name="msg_unable_to_update_password">Unable to update password. Error message: %1$s</string> <!-- TODO - Add proper translation --> <string name="msg_unable_to_update_password">पासवर्ड अपडेट करने में असमर्थ। त्रुटि संदेश: %1$s</string>
<string name="msg_password_updated_successfully">Password updated successfully</string> <!-- TODO - Add proper translation --> <string name="msg_password_updated_successfully">पासवर्ड सफलतापूर्वक अपडेट किया गया</string>
<plurals name="msg_reacted_with_"> <plurals name="msg_reacted_with_">
<item quantity="one">% 1 $ s ने% 2 $ %d s के साथ प्रतिक्रिया व्यक्त की</item> <item quantity="one">%1$s ने %2$s के साथ प्रतिक्रिया व्यक्त की</item>
<item quantity="few">% 1 $ s ने% 2 $ s के साथ प्रतिक्रिया व्यक्त की</item> <item quantity="few">%1$s ने %2$s के साथ प्रतिक्रिया व्यक्त की</item>
<item quantity="many">% 1 $ s ने% 2 $ s के साथ प्रतिक्रिया व्यक्त की</item> <item quantity="many">%1$s ने %2$s के साथ प्रतिक्रिया व्यक्त की</item>
</plurals> </plurals>
<!-- Preferences messages --> <!-- Preferences messages -->
...@@ -310,13 +310,12 @@ ...@@ -310,13 +310,12 @@
<string name="alert_title_default_skin_tone">डिफ़ॉल्ट त्वचा टोन</string> <string name="alert_title_default_skin_tone">डिफ़ॉल्ट त्वचा टोन</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">क्रम</string> <string name="msg_sort">क्रम</string>
<string name="dialog_sort_title">द्वारा सॉर्ट करें</string> <string name="dialog_sort_title">द्वारा सॉर्ट करें</string>
<string name="dialog_sort_by_alphabet">वर्णानुक्रम</string> <string name="dialog_sort_by_alphabet">वर्णानुक्रम</string>
<string name="dialog_sort_by_activity">गतिविधि</string> <string name="dialog_sort_by_activity">गतिविधि</string>
<string name="dialog_group_by_type">प्रकार के आधार पर समूह</string> <string name="dialog_group_by_type">प्रकार के आधार पर समूह</string>
<string name="dialog_group_favourites">पसंदीदा समूह</string> <string name="dialog_group_favourites">पसंदीदा समूह</string>
<string name="dialog_button_done">पूर्ण</string>
<string name="chatroom_header">हैडर</string> <string name="chatroom_header">हैडर</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<string name="msg_send">Inviare</string> <string name="msg_send">Inviare</string>
<string name="msg_sent_attachment">Inviato allegato</string> <string name="msg_sent_attachment">Inviato allegato</string>
<string name="msg_welcome_to_rocket_chat">Benvenuto in Rocket.Chat </string> <string name="msg_welcome_to_rocket_chat">Benvenuto in Rocket.Chat </string>
<string name="msg_team_communication">Team Communication</string> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">Accedi con <b>e-mail</b></string> <string name="msg_login_with_email">Accedi con <b>e-mail</b></string>
<string name="msg_create_account">Crea un utente</string> <string name="msg_create_account">Crea un utente</string>
<string name="msg_continue_with_facebook">Continua con <b>Facebook</b></string> <string name="msg_continue_with_facebook">Continua con <b>Facebook</b></string>
...@@ -306,13 +306,12 @@ ...@@ -306,13 +306,12 @@
<string name="alert_title_default_skin_tone">Default skin tone</string> <string name="alert_title_default_skin_tone">Default skin tone</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Ordinare</string> <string name="msg_sort">Ordinare</string>
<string name="dialog_sort_title">Ordinare per</string> <string name="dialog_sort_title">Ordinare per</string>
<string name="dialog_sort_by_alphabet">Alfabeto</string> <string name="dialog_sort_by_alphabet">Alfabeto</string>
<string name="dialog_sort_by_activity">Attività</string> <string name="dialog_sort_by_activity">Attività</string>
<string name="dialog_group_by_type">Raggruppa per tipo</string> <string name="dialog_group_by_type">Raggruppa per tipo</string>
<string name="dialog_group_favourites">Raggruppa preferiti</string> <string name="dialog_group_favourites">Raggruppa preferiti</string>
<string name="dialog_button_done">Fatto</string>
<string name="chatroom_header">Intestazione</string> <string name="chatroom_header">Intestazione</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
<string name="msg_send">送信</string> <string name="msg_send">送信</string>
<string name="msg_sent_attachment">添付ファイルを送信しました</string> <string name="msg_sent_attachment">添付ファイルを送信しました</string>
<string name="msg_welcome_to_rocket_chat">Rocket.Chatへようこそ</string> <string name="msg_welcome_to_rocket_chat">Rocket.Chatへようこそ</string>
<string name="msg_team_communication">チームコミュニケーション</string> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email"><b>e-mail</b>でログイン</string> <string name="msg_login_with_email"><b>e-mail</b>でログイン</string>
<string name="msg_create_account">アカウントを作成</string> <string name="msg_create_account">アカウントを作成</string>
<string name="msg_continue_with_facebook"><b>Facebook</b>でログイン</string> <string name="msg_continue_with_facebook"><b>Facebook</b>でログイン</string>
...@@ -312,14 +312,13 @@ ...@@ -312,14 +312,13 @@
<string name="alert_title_default_skin_tone">デフォルトスキントークン</string> <string name="alert_title_default_skin_tone">デフォルトスキントークン</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">ソート</string> <string name="msg_sort">ソート</string>
<string name="dialog_sort_title">ソート</string> <string name="dialog_sort_title">ソート</string>
<string name="dialog_sort_by_alphabet">アルファベット順</string> <string name="dialog_sort_by_alphabet">アルファベット順</string>
<string name="dialog_sort_by_activity">アクティビティ順</string> <string name="dialog_sort_by_activity">アクティビティ順</string>
<string name="dialog_group_by_type">グループ別</string> <string name="dialog_group_by_type">グループ別</string>
<string name="dialog_group_favourites">お気に入りのグループ</string> <string name="dialog_group_favourites">お気に入りのグループ</string>
<string name="chatroom_header">ヘッダ</string> <string name="chatroom_header">ヘッダ</string>
<string name="dialog_button_done">完了</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
<string name="title_update_profile">Editar perfil</string> <string name="title_update_profile">Editar perfil</string>
<string name="title_about">Sobre</string> <string name="title_about">Sobre</string>
<string name="title_create_channel">Criar chat</string> <string name="title_create_channel">Criar chat</string>
<string name="title_licence">Licença</string> <!-- TODO Add translation --> <string name="title_licence">Licença</string>
<string name="title_are_you_sure">Você tem certeza?</string> <string name="title_are_you_sure">Você tem certeza?</string>
<string name="title_channel_details">Channel Details</string> <!-- TODO add translation --> <string name="title_channel_details">Detalhes do canal</string>
<string name="title_topic">Tópico</string> <string name="title_topic">Tópico</string>
<string name="title_announcement">Anúncio</string> <string name="title_announcement">Anúncio</string>
<string name="title_description">Descrição</string> <string name="title_description">Descrição</string>
...@@ -150,29 +150,30 @@ ...@@ -150,29 +150,30 @@
<string name="msg_send">Enviar</string> <string name="msg_send">Enviar</string>
<string name="msg_delete_message">Remove mensagem</string> <string name="msg_delete_message">Remove mensagem</string>
<string name="msg_delete_description">Tem certeza que quer apagar esta mensagem?</string> <string name="msg_delete_description">Tem certeza que quer apagar esta mensagem?</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation --> <string name="msg_welcome_to_rocket_chat">Bem-vindo ao Rocket.Chat</string>
<string name="msg_team_communication">Open Source Communication</string> <!-- TODO Add translation --> <string name="msg_team_communication">Comunicação para equipes</string>
<string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation --> <string name="msg_login_with_email">Fazer login com <b>e-mail</b></string>
<string name="msg_create_account">Create an account</string> <!-- TODO Add translation --> <string name="msg_create_account">Criar conta</string>
<string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_facebook">Continuar com <b>Facebook</b></string>
<string name="msg_continue_with_github">Continue with <b>Github</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_github">Continuar com <b>Github</b></string>
<string name="msg_continue_with_google">Continue with <b>Google</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_google">Continuar com <b>Google</b></string>
<string name="msg_continue_with_linkedin">Continue with <b>Linkedin</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_linkedin">Continuar com <b>Linkedin</b></string>
<string name="msg_continue_with_gitlab">Continue with <b>GitLab</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_gitlab">Continuar com <b>GitLab</b></string>
<string name="msg_continue_with_wordpress">Continue with <b>WordPress</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_wordpress">Continuar com <b>WordPress</b></string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string> <!-- TODO Add translation --> <string name="msg_two_factor_authentication">Autenticação de dois fatores</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string> <!-- TODO Add translation --> <string name="msg__your_2fa_code">Qual é o seu código da autenticação de dois fatores?</string>
<string name="msg_view_more">visualizar mais</string> <string name="msg_view_more">visualizar mais</string>
<string name="msg_view_less">visualizar menos</string> <string name="msg_view_less">visualizar menos</string>
<string name="msg_permalink_copied">Permalink copiado</string> <string name="msg_permalink_copied">Permalink copiado</string>
<string name="msg_send_email">Enviar e-mail</string> <string name="msg_send_email">Enviar e-mail</string>
<string name="msg_android_app_support">Suporte ao aplicativo Android</string> <string name="msg_android_app_support">Suporte ao aplicativo Android</string>
<string name="msg_muted_on_this_channel">Você está silenciado neste canal</string> <string name="msg_muted_on_this_channel">Você está silenciado neste canal</string>
<string name="msg_no_topic">No topic added</string> <!-- TODO Add translation --> <string name="msg_no_topic">Nenhum tópico adicionado</string>
<string name="msg_no_announcement">No announcement added</string> <!-- TODO Add translation --> <string name="msg_no_announcement">Nenhum anúncio adicionado</string>
<string name="msg_no_description">No description added</string> <!-- TODO Add translation --> <string name="msg_no_description">Nenhuma descrição adicionada</string>
<string name="msg_unable_to_update_password">Não foi possível atualizar a senha. Mensagem de erro: %1$s</string> <string name="msg_unable_to_update_password">Não foi possível atualizar a senha. Mensagem de erro: %1$s</string>
<string name="msg_password_updated_successfully">Senha alterada com sucesso</string> <string name="msg_password_updated_successfully">Senha alterada com sucesso</string>
<string name="msg_sort">Ordenar</string>
<plurals name="msg_reacted_with_"> <plurals name="msg_reacted_with_">
<item quantity="one">%1$s reagiu com %2$s</item> <item quantity="one">%1$s reagiu com %2$s</item>
<item quantity="other">%1$s reagiram com %2$s</item> <item quantity="other">%1$s reagiram com %2$s</item>
...@@ -194,7 +195,7 @@ ...@@ -194,7 +195,7 @@
<string name="msg_analytics_tracking">Rastreamento de análises</string> <string name="msg_analytics_tracking">Rastreamento de análises</string>
<string name="msg_send_analytics_tracking">Envie estatísticas anônimas para ajudar a melhorar este app</string> <string name="msg_send_analytics_tracking">Envie estatísticas anônimas para ajudar a melhorar este app</string>
<string name="msg_do_not_send_analytics_tracking">Não envie estatísticas anônimas para ajudar a melhorar este app</string> <string name="msg_do_not_send_analytics_tracking">Não envie estatísticas anônimas para ajudar a melhorar este app</string>
<string name="msg_not_applicable_since_it_is_a_foss_version">Not aplicável devido a versão do aplicativo ser FOSS</string> <!-- TODO Add translation --> <string name="msg_not_applicable_since_it_is_a_foss_version">Não aplicável devido a versão do aplicativo ser FOSS</string>
<!-- System messages --> <!-- System messages -->
<string name="message_room_name_changed">Nome da sala alterado para: %1$s por %2$s</string> <string name="message_room_name_changed">Nome da sala alterado para: %1$s por %2$s</string>
...@@ -219,29 +220,28 @@ ...@@ -219,29 +220,28 @@
<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">Pinar mensagem</string> <string name="action_msg_pin">Fixar mensagem</string>
<string name="action_msg_unpin">Despinar mensagem</string> <string name="action_msg_unpin">Desfixar mensagem</string>
<string name="action_msg_star">Favoritar mensagem</string> <string name="action_msg_star">Marcar como favorita</string>
<string name="action_msg_unstar">Desfavoritar messagem</string> <string name="action_msg_unstar">Desmarcar como favorita</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_copy_permalink">Copiar permalink</string>
<!-- TODO - Add proper translation -->
<string name="action_msg_report">Reportar</string> <string name="action_msg_report">Reportar</string>
<!-- Permission messages --> <!-- Permission messages -->
<string name="permission_editing_not_allowed">Edição não permitida</string> <string name="permission_editing_not_allowed">Edição não permitida</string>
<string name="permission_deleting_not_allowed">Remoção não permitida</string> <string name="permission_deleting_not_allowed">Remoção não permitida</string>
<string name="permission_pinning_not_allowed">Pinagem não permitida</string> <string name="permission_pinning_not_allowed">Pinagem não permitida</string>
<string name="permission_starring_not_allowed">Favoritar não permitido</string> <string name="permission_starring_not_allowed">Marcar como favorita não permitido</string>
<!-- Search message --> <!-- Search message -->
<string name="title_search_message">Procurar mensagem</string> <string name="title_search_message">Procurar mensagem</string>
<!-- Favorite/Unfavorite chat room --> <!-- Favorite/Unfavorite chat room -->
<string name="title_favorite_chat">Favoritar canal</string> <string name="title_favorite_chat">Marcar canal como favorito</string>
<string name="title_unfavorite_chat">Desfavoritar canal</string> <string name="title_unfavorite_chat">Desmarcar canal como favorito</string>
<!-- Members List --> <!-- Members List -->
<string name="title_members_list">Membros</string> <string name="title_members_list">Membros</string>
...@@ -310,13 +310,11 @@ ...@@ -310,13 +310,11 @@
<string name="alert_title_default_skin_tone">Tom de pele padrão</string> <string name="alert_title_default_skin_tone">Tom de pele padrão</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Ordenar</string>
<string name="dialog_sort_title">Ordenar por</string> <string name="dialog_sort_title">Ordenar por</string>
<string name="dialog_sort_by_alphabet">Alfabeticamente</string> <string name="dialog_sort_by_alphabet">Alfabeticamente</string>
<string name="dialog_sort_by_activity">Atividade</string> <string name="dialog_sort_by_activity">Atividade</string>
<string name="dialog_group_by_type">Agrupar por tipo</string> <string name="dialog_group_by_type">Agrupar por tipo</string>
<string name="dialog_group_favourites">Grupos favoritos</string> <string name="dialog_group_favourites">Grupos favoritos</string>
<string name="dialog_button_done">Done</string><!-- TODO Add translation -->
<string name="chatroom_header">Cabeçalho</string> <string name="chatroom_header">Cabeçalho</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<string name="msg_channel_name">Название канала</string> <string name="msg_channel_name">Название канала</string>
<string name="msg_search">Поиск</string> <string name="msg_search">Поиск</string>
<string name="msg_welcome_to_rocket_chat">Rocket.Chat</string> <string name="msg_welcome_to_rocket_chat">Rocket.Chat</string>
<string name="msg_team_communication">Чат с открытым исходным кодом</string> <string name="msg_team_communication">Командное общение</string>
<string name="msg_login_with_email">Войти с помощью <b>e-mail</b></string> <string name="msg_login_with_email">Войти с помощью <b>e-mail</b></string>
<string name="msg_create_account">Создать аккаунт</string> <string name="msg_create_account">Создать аккаунт</string>
<string name="msg_continue_with_facebook">Войти с помощью <b>Facebook</b></string> <string name="msg_continue_with_facebook">Войти с помощью <b>Facebook</b></string>
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
<string name="msg_channel_created_successfully">Канал создан успешно</string> <string name="msg_channel_created_successfully">Канал создан успешно</string>
<!-- Preferences messages --> <!-- Preferences messages -->
<string name="msg_analytics_tracking">Отслеживание Analytics</string> <string name="msg_analytics_tracking">Отслеживание аналитики</string>
<string name="msg_send_analytics_tracking">Отправлять анонимную статистику для улучшения приложения.</string> <string name="msg_send_analytics_tracking">Отправлять анонимную статистику для улучшения приложения.</string>
<string name="msg_do_not_send_analytics_tracking">Не отправлять анонимную статистику для улучшения приложения</string> <string name="msg_do_not_send_analytics_tracking">Не отправлять анонимную статистику для улучшения приложения</string>
<string name="msg_not_applicable_since_it_is_a_foss_version">Не применимо, так как это FOSS версия</string> <string name="msg_not_applicable_since_it_is_a_foss_version">Не применимо, так как это FOSS версия</string>
...@@ -307,13 +307,12 @@ ...@@ -307,13 +307,12 @@
<string name="alert_title_default_skin_tone">Тон кожи по умолчанию</string> <string name="alert_title_default_skin_tone">Тон кожи по умолчанию</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Сортировать</string> <string name="msg_sort">Сортировать</string>
<string name="dialog_sort_title">Сортировать по</string> <string name="dialog_sort_title">Сортировать по</string>
<string name="dialog_sort_by_alphabet">По алфавиту</string> <string name="dialog_sort_by_alphabet">По алфавиту</string>
<string name="dialog_sort_by_activity">По активности</string> <string name="dialog_sort_by_activity">По активности</string>
<string name="dialog_group_by_type">Группировать по типу</string> <string name="dialog_group_by_type">Группировать по типу</string>
<string name="dialog_group_favourites">Группировать избранное</string> <string name="dialog_group_favourites">Группировать избранное</string>
<string name="dialog_button_done">Ок</string>
<string name="chatroom_header">Заголовок</string> <string name="chatroom_header">Заголовок</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
...@@ -335,7 +334,7 @@ ...@@ -335,7 +334,7 @@
<!-- User Details --> <!-- User Details -->
<string name="message">Сообщение</string> <string name="message">Сообщение</string>
<string name="timezone">Часовой поясe</string> <string name="timezone">Часовой пояс</string>
<string name="error_opening_dm">При создании этого диалога что-то пошло не так...</string> <string name="error_opening_dm">При создании этого диалога что-то пошло не так...</string>
<string name="retry">Повторить</string> <string name="retry">Повторить</string>
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<string name="msg_send">Gönder</string> <string name="msg_send">Gönder</string>
<string name="msg_sent_attachment">Bir dosya eki gönderildi</string> <string name="msg_sent_attachment">Bir dosya eki gönderildi</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation --> <string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string> <!-- TODO Add translation -->
<string name="msg_team_communication">Team Communication</string> <!-- TODO Add translation --> <string name="msg_team_communication">Team Communication</string> <!-- TODO Translate -->
<string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation --> <string name="msg_login_with_email">Login with <b>e-mail</b></string> <!-- TODO Add translation -->
<string name="msg_create_account">Create an account</string> <!-- TODO Add translation --> <string name="msg_create_account">Create an account</string> <!-- TODO Add translation -->
<string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation --> <string name="msg_continue_with_facebook">Continue with <b>Facebook</b></string> <!-- TODO Add translation -->
...@@ -312,13 +312,12 @@ ...@@ -312,13 +312,12 @@
<string name="alert_title_default_skin_tone">Varsayılan tasarım tonu</string> <string name="alert_title_default_skin_tone">Varsayılan tasarım tonu</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Sırala</string> <string name="msg_sort">Sırala</string>
<string name="dialog_sort_title">Sırala</string> <string name="dialog_sort_title">Sırala</string>
<string name="dialog_sort_by_alphabet">Alfabetik</string> <string name="dialog_sort_by_alphabet">Alfabetik</string>
<string name="dialog_sort_by_activity">Aktiviteye Göre</string> <string name="dialog_sort_by_activity">Aktiviteye Göre</string>
<string name="dialog_group_by_type">Türüne göre grupla</string> <string name="dialog_group_by_type">Türüne göre grupla</string>
<string name="dialog_group_favourites">Favorileri grupla</string> <string name="dialog_group_favourites">Favorileri grupla</string>
<string name="dialog_button_done">Tamam</string>
<string name="chatroom_header">Başlık</string> <string name="chatroom_header">Başlık</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -308,13 +308,12 @@ ...@@ -308,13 +308,12 @@
<string name="alert_title_default_skin_tone">Тон шкіри за замовчуванням</string> <string name="alert_title_default_skin_tone">Тон шкіри за замовчуванням</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Сортувати</string> <string name="msg_sort">Сортувати</string>
<string name="dialog_sort_title">Сортувати за</string> <string name="dialog_sort_title">Сортувати за</string>
<string name="dialog_sort_by_alphabet">За алфавітом</string> <string name="dialog_sort_by_alphabet">За алфавітом</string>
<string name="dialog_sort_by_activity">За активністю</string> <string name="dialog_sort_by_activity">За активністю</string>
<string name="dialog_group_by_type">Групувати за типом</string> <string name="dialog_group_by_type">Групувати за типом</string>
<string name="dialog_group_favourites">Групувати обране</string> <string name="dialog_group_favourites">Групувати обране</string>
<string name="dialog_button_done">Ок</string>
<string name="chatroom_header">Заголовок</string> <string name="chatroom_header">Заголовок</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -323,13 +323,12 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin ...@@ -323,13 +323,12 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="alert_title_default_skin_tone">Default skin tone</string> <string name="alert_title_default_skin_tone">Default skin tone</string>
<!-- Sorting and grouping--> <!-- Sorting and grouping-->
<string name="menu_chatroom_sort">Sort</string> <string name="msg_sort">Sort</string>
<string name="dialog_sort_title">Sort by</string> <string name="dialog_sort_title">Sort by</string>
<string name="dialog_sort_by_alphabet">Alphabetical</string> <string name="dialog_sort_by_alphabet">Alphabetical</string>
<string name="dialog_sort_by_activity">Activity</string> <string name="dialog_sort_by_activity">Activity</string>
<string name="dialog_group_by_type">Group by type</string> <string name="dialog_group_by_type">Group by type</string>
<string name="dialog_group_favourites">Group favourites</string> <string name="dialog_group_favourites">Group favourites</string>
<string name="dialog_button_done">Done</string>
<string name="chatroom_header">Header</string> <string name="chatroom_header">Header</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
......
...@@ -25,9 +25,7 @@ import kotlinx.android.synthetic.main.dialog_skin_tone_chooser.view.* ...@@ -25,9 +25,7 @@ import kotlinx.android.synthetic.main.dialog_skin_tone_chooser.view.*
import kotlinx.coroutines.experimental.android.UI import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.launch import kotlinx.coroutines.experimental.launch
class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow(context, view) { class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow(context, view) {
private lateinit var viewPager: ViewPager private lateinit var viewPager: ViewPager
private lateinit var tabLayout: TabLayout private lateinit var tabLayout: TabLayout
private lateinit var searchView: View private lateinit var searchView: View
...@@ -84,7 +82,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow ...@@ -84,7 +82,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
.setCancelable(true) .setCancelable(true)
.create() .create()
with (view) { with(view) {
image_view_default_tone.setOnClickListener { image_view_default_tone.setOnClickListener {
dialog.dismiss() dialog.dismiss()
changeSkinTone(Fitzpatrick.Default) changeSkinTone(Fitzpatrick.Default)
...@@ -138,7 +136,10 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow ...@@ -138,7 +136,10 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
return when (tone) { return when (tone) {
Fitzpatrick.Default -> ContextCompat.getColor(context, R.color.tone_default) Fitzpatrick.Default -> ContextCompat.getColor(context, R.color.tone_default)
Fitzpatrick.LightTone -> ContextCompat.getColor(context, R.color.tone_light) Fitzpatrick.LightTone -> ContextCompat.getColor(context, R.color.tone_light)
Fitzpatrick.MediumLightTone -> ContextCompat.getColor(context, R.color.tone_medium_light) Fitzpatrick.MediumLightTone -> ContextCompat.getColor(
context,
R.color.tone_medium_light
)
Fitzpatrick.MediumTone -> ContextCompat.getColor(context, R.color.tone_medium) Fitzpatrick.MediumTone -> ContextCompat.getColor(context, R.color.tone_medium)
Fitzpatrick.MediumDarkTone -> ContextCompat.getColor(context, R.color.tone_medium_dark) Fitzpatrick.MediumDarkTone -> ContextCompat.getColor(context, R.color.tone_medium_dark)
Fitzpatrick.DarkTone -> ContextCompat.getColor(context, R.color.tone_dark) Fitzpatrick.DarkTone -> ContextCompat.getColor(context, R.color.tone_dark)
...@@ -151,7 +152,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow ...@@ -151,7 +152,7 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
is EmojiKeyboardListener -> it is EmojiKeyboardListener -> it
else -> { else -> {
val fragments = (it as AppCompatActivity).supportFragmentManager.fragments val fragments = (it as AppCompatActivity).supportFragmentManager.fragments
if (fragments.size == 0 || !(fragments[0] is EmojiKeyboardListener)) { if (fragments.size == 0 || fragments[0] !is EmojiKeyboardListener) {
// Since the app can arrive in an inconsistent state at this point, do not throw // Since the app can arrive in an inconsistent state at this point, do not throw
// throw IllegalStateException("activity/fragment should implement Listener interface") // throw IllegalStateException("activity/fragment should implement Listener interface")
null null
...@@ -190,7 +191,6 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow ...@@ -190,7 +191,6 @@ class EmojiKeyboardPopup(context: Context, view: View) : OverKeyboardPopupWindow
} }
class EmojiTextWatcher(private val editor: EditText) : TextWatcher { class EmojiTextWatcher(private val editor: EditText) : TextWatcher {
@Volatile @Volatile
private var emojiToRemove = mutableListOf<EmojiTypefaceSpan>() private var emojiToRemove = mutableListOf<EmojiTypefaceSpan>()
......
...@@ -21,7 +21,6 @@ package chat.rocket.android.emoji ...@@ -21,7 +21,6 @@ package chat.rocket.android.emoji
import android.content.Context import android.content.Context
import android.graphics.Point import android.graphics.Point
import android.graphics.Rect import android.graphics.Rect
import android.os.Build
import android.view.Gravity import android.view.Gravity
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
......
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