Unverified Commit e5b6f8bf authored by Rafael Kellermann Streit's avatar Rafael Kellermann Streit Committed by GitHub

Merge pull request #1336 from divyanshub024/toast-copy

[IMPROVEMENT] Show toast on copy message
parents 79dc4dbf d1636afc
......@@ -17,8 +17,8 @@ object DateTimeHelper {
* @param long The [Long]
* @return The [LocalDateTime] from a [Long].
*/
fun getLocalDateTime(long: Long): LocalDateTime {
return LocalDateTime.ofInstant(Instant.ofEpochMilli(long), ZoneId.systemDefault())
fun getLocalDateTime(long: Long?): LocalDateTime {
return LocalDateTime.ofInstant(long?.let { Instant.ofEpochMilli(it) }, ZoneId.systemDefault())
}
/**
......
......@@ -507,6 +507,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
ui {
val clipboard = it.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
clipboard.primaryClip = ClipData.newPlainText("", message)
showToast(R.string.msg_message_copied)
}
}
......
......@@ -123,6 +123,7 @@
// TODO: Add proper translation.
<string name="msg_several_users_are_typing">Several users are typing…</string>
<string name="msg_no_search_found">No se han encontrado resultados</string>
<string name="msg_message_copied">Mensaje copiado</string>
<!-- System messages -->
<string name="message_room_name_changed">Nombre de la sala cambiado para: %1$s por %2$s</string>
......
......@@ -122,6 +122,7 @@
// TODO: Add proper translation.
<string name="msg_several_users_are_typing">Several users are typing…</string>
<string name="msg_no_search_found">Aucun résultat trouvé</string>
<string name="msg_message_copied">Message copié</string>
<!-- System messages -->
<string name="message_room_name_changed">Le nom de le salle a changé à: %1$s par %2$s</string>
......
......@@ -124,6 +124,7 @@
// TODO: Add proper translation.
<string name="msg_several_users_are_typing">Several users are typing…</string>
<string name="msg_no_search_found">कोई परिणाम नहीं मिला</string>
<string name="msg_message_copied">संदेश कॉपी किया गया</string>
<!-- System messages -->
<string name="message_room_name_changed">%2$s ने रूम का नाम बदलकर %1$s किया</string>
......
......@@ -113,6 +113,7 @@
<string name="msg_are_typing">\u0020estão digitando…</string>
<string name="msg_several_users_are_typing">Vários usuários estão digitando…</string>
<string name="msg_no_search_found">nenhum resultado encontrado</string>
<string name="msg_message_copied">Mensagem copiada</string>
<!-- System messages -->
<string name="message_room_name_changed">Nome da sala alterado para: %1$s por %2$s</string>
......
......@@ -112,6 +112,7 @@
<string name="msg_are_typing">\u0020печатают…</string>
<string name="msg_several_users_are_typing">Несколько пользователей печатают…</string>
<string name="msg_no_search_found">Результатов не найдено</string>
<string name="msg_message_copied">Скопировано сообщение</string>
<!-- System messages -->
<string name="message_room_name_changed">Название канала изменено на: %1$s by %2$s</string>
......
......@@ -114,6 +114,7 @@
<string name="msg_are_typing">\u0020are typing…</string>
<string name="msg_several_users_are_typing">Several users are typing…</string>
<string name="msg_no_search_found">No result found</string>
<string name="msg_message_copied">Message copied</string>
<!-- System messages -->
<string name="message_room_name_changed">Room name changed to: %1$s by %2$s</string>
......
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