Commit 7776daa0 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.Android into HusseinElFeky-develop

parents 3898b813 eeca9f1c
...@@ -71,6 +71,7 @@ import chat.rocket.android.helper.AndroidPermissionsHelper.hasCameraPermission ...@@ -71,6 +71,7 @@ import chat.rocket.android.helper.AndroidPermissionsHelper.hasCameraPermission
import chat.rocket.android.helper.AndroidPermissionsHelper.hasWriteExternalStoragePermission import chat.rocket.android.helper.AndroidPermissionsHelper.hasWriteExternalStoragePermission
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.extension.orFalse
import chat.rocket.android.util.extensions.circularRevealOrUnreveal import chat.rocket.android.util.extensions.circularRevealOrUnreveal
import chat.rocket.android.util.extensions.clearLightStatusBar import chat.rocket.android.util.extensions.clearLightStatusBar
import chat.rocket.android.util.extensions.fadeIn import chat.rocket.android.util.extensions.fadeIn
...@@ -463,6 +464,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR ...@@ -463,6 +464,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
setupToolbar(roomUiModel.name.toString()) setupToolbar(roomUiModel.name.toString())
setupMessageComposer(roomUiModel) setupMessageComposer(roomUiModel)
isBroadcastChannel = roomUiModel.broadcast isBroadcastChannel = roomUiModel.broadcast
isFavorite = roomUiModel.favorite.orFalse()
if (isBroadcastChannel && !roomUiModel.canModerate) { if (isBroadcastChannel && !roomUiModel.canModerate) {
disableMenu = true disableMenu = true
activity?.invalidateOptionsMenu() activity?.invalidateOptionsMenu()
......
...@@ -69,7 +69,7 @@ abstract class ChatRoomDao : BaseDao<ChatRoomEntity> { ...@@ -69,7 +69,7 @@ abstract class ChatRoomDao : BaseDao<ChatRoomEntity> {
@Query(""" @Query("""
$BASE_QUERY $BASE_QUERY
$FILTER_NOT_OPENED $FILTER_NOT_OPENED
ORDER BY name ORDER BY name COLLATE NOCASE
""") """)
abstract fun getAllAlphabetically(): LiveData<List<ChatRoom>> abstract fun getAllAlphabetically(): LiveData<List<ChatRoom>>
...@@ -79,7 +79,7 @@ abstract class ChatRoomDao : BaseDao<ChatRoomEntity> { ...@@ -79,7 +79,7 @@ abstract class ChatRoomDao : BaseDao<ChatRoomEntity> {
$FILTER_NOT_OPENED $FILTER_NOT_OPENED
ORDER BY ORDER BY
$TYPE_ORDER, $TYPE_ORDER,
name name COLLATE NOCASE
""") """)
abstract fun getAllAlphabeticallyGrouped(): LiveData<List<ChatRoom>> abstract fun getAllAlphabeticallyGrouped(): LiveData<List<ChatRoom>>
......
...@@ -3,7 +3,7 @@ package chat.rocket.android.helper ...@@ -3,7 +3,7 @@ package chat.rocket.android.helper
object JitsiHelper { object JitsiHelper {
/** /**
* Returns the for the Jitsi video conferencing URL. * Returns the Jitsi video conferencing URL.
* *
* @param isSecureProtocol True if using SSL, false otherwise - from the public settings. * @param isSecureProtocol True if using SSL, false otherwise - from the public settings.
* @param domain The Jitsi domain - from public settings. * @param domain The Jitsi domain - from public settings.
......
...@@ -94,10 +94,16 @@ class MessageParser @Inject constructor( ...@@ -94,10 +94,16 @@ class MessageParser @Inject constructor(
} }
private fun getMention(user: SimpleUser): String { private fun getMention(user: SimpleUser): String {
user.id?.let {
if (SYSTEM_MENTIONS.contains(it)) {
return "@$it"
}
}
return if (settings.useRealName()) { return if (settings.useRealName()) {
user.name ?: "@${user.username}" user.name ?: user.username.orEmpty()
} else { } else {
"@${user.username}" user.username.orEmpty()
} }
} }
...@@ -527,5 +533,7 @@ class MessageParser @Inject constructor( ...@@ -527,5 +533,7 @@ class MessageParser @Inject constructor(
*/ */
private val WEB_URL = Pattern.compile( private val WEB_URL = Pattern.compile(
"($WEB_URL_WITH_PROTOCOL|$WEB_URL_WITHOUT_PROTOCOL)") "($WEB_URL_WITH_PROTOCOL|$WEB_URL_WITHOUT_PROTOCOL)")
private val SYSTEM_MENTIONS = arrayOf("all", "here")
} }
} }
...@@ -13,14 +13,15 @@ ...@@ -13,14 +13,15 @@
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_below="@+id/layout_app_bar" android:layout_below="@+id/layout_app_bar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_app_bar"> app:layout_constraintTop_toBottomOf="@+id/layout_app_bar">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp"> android:paddingTop="20dp">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/profile_container" android:id="@+id/profile_container"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<string name="action_use_this_username">Benutze den Benutzernamen</string> <string name="action_use_this_username">Benutze den Benutzernamen</string>
<string name="action_terms_of_service">Nutzungsbedingungen</string> <string name="action_terms_of_service">Nutzungsbedingungen</string>
<string name="action_privacy_policy">Datenschutz</string> <string name="action_privacy_policy">Datenschutz</string>
<string name="action_new_channel">New channel</string> <!-- TODO Translate --> <string name="action_new_channel">Neuer Kanal</string>
<string name="action_search">Suche</string> <string name="action_search">Suche</string>
<string name="action_update">Updaten</string> <string name="action_update">Updaten</string>
<string name="action_settings">Einstellungen</string> <string name="action_settings">Einstellungen</string>
...@@ -60,18 +60,18 @@ ...@@ -60,18 +60,18 @@
<string name="action_remove_favorite">Favoriten entfernen</string> <string name="action_remove_favorite">Favoriten entfernen</string>
<!-- Settings messages --> <!-- Settings messages -->
<string name="msg_contact_us">Contact us</string> <!-- TODO Translate --> <string name="msg_contact_us">Kontaktiere uns</string>
<string name="msg_language">Language</string> <!-- TODO Translate --> <string name="msg_language">Sprache</string>
<string name="msg_review_this_app">Review this app</string> <!-- TODO Translate --> <string name="msg_review_this_app">Bewerte diese App</string>
<string name="msg_share_this_app">Share this app</string> <!-- TODO Translate --> <string name="msg_share_this_app">Teile diese App</string>
<string name="msg_administration">Administration</string> <!-- TODO Translate --> <string name="msg_administration">Administration</string>
<string name="msg_license">License</string> <!-- TODO Translate --> <string name="msg_license">Lizenz</string>
<string name="msg_app_version">Version: %1$s (%2$d)</string> <!-- TODO Translate --> <string name="msg_app_version">Version: %1$s (%2$d)</string>
<string name="msg_server_version">Server version: %1$s</string> <!-- TODO Translate --> <string name="msg_server_version">Serverversion: %1$s</string>
<string name="msg_send_analytics">Send analytics</string> <!-- TODO Translate --> <string name="msg_send_analytics">Analysesaten senden</string>
<string name="msg_logout_from_rocket_chat">Logout from Rocket.Chat</string> <!-- TODO Translate --> <string name="msg_logout_from_rocket_chat">Logout von Rocket.Chat</string>
<string name="msg_delete_account">Delete account</string> <!-- TODO Translate --> <string name="msg_delete_account">Konto löschen</string>
<string name="msg_change_status">Change status</string> <!-- TODO Translate --> <string name="msg_change_status">Status ändern</string>
<!-- Regular information messages --> <!-- Regular information messages -->
<string name="msg_generic_error">Entschuldigung, ein Fehler ist aufgetreten, bitte versuchen Sie es noch einmal.</string> <string name="msg_generic_error">Entschuldigung, ein Fehler ist aufgetreten, bitte versuchen Sie es noch einmal.</string>
...@@ -172,11 +172,11 @@ ...@@ -172,11 +172,11 @@
<item quantity="other">%1$s reagierte mit %2$s</item> <item quantity="other">%1$s reagierte mit %2$s</item>
</plurals> </plurals>
<string name="msg_credentials_saved_successfully">Login-Daten erfolgreich gespeichert</string> <string name="msg_credentials_saved_successfully">Login-Daten erfolgreich gespeichert</string>
<string name="msg_camera_permission_denied">Camera permission is needed to open camera.</string> <!-- TODO Add translation --> <string name="msg_camera_permission_denied">Zum Öffnen der Kamera ist eine Kamera-Berechtigung erforderlich.</string>
<string name="msg_storage_permission_denied">Storage permission is needed to open Drawing.</string> <!-- TODO Add translation --> <string name="msg_storage_permission_denied">Zum Öffnen der Zeichnung ist eine Speicher-Berechtigung erforderlich.</string>
<string name="msg_server">Server</string> <!-- TODO Translate --> <string name="msg_server">Server</string>
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate --> <string name="msg_add_new_server">Neuen Server hinzufügen</string>
<string name="msg_directory">Directory</string> <!-- TODO Translate --> <string name="msg_directory">Verzeichnis</string>
<!-- Create channel messages --> <!-- Create channel messages -->
<string name="msg_private_channel">Privat</string> <string name="msg_private_channel">Privat</string>
...@@ -314,20 +314,20 @@ ...@@ -314,20 +314,20 @@
<string name="alert_title_default_skin_tone">Standard Hautton</string> <string name="alert_title_default_skin_tone">Standard Hautton</string>
<!-- Sort and group --> <!-- Sort and group -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate --> <string name="msg_sort_by_placeholder">Sortiere nach %1$s</string>
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate --> <string name="msg_sort_by">Sortiert nach</string>
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate --> <string name="msg_sort_by_activity">Aktivität</string>
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate --> <string name="msg_sort_by_name">Name</string>
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate --> <string name="msg_group_by_unread_on_top">Ungelesen oben</string>
<string name="msg_group_by_type">Group by type</string> <!-- TODO Translate --> <string name="msg_group_by_type">Gruppieren nach Typ</string>
<string name="msg_group_by_favorites">Group by favorites</string> <!-- TODO Translate --> <string name="msg_group_by_favorites">Gruppieren nach Favoriten</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
<string name="header_favorite">Favoriten</string> <string name="header_favorite">Favoriten</string>
<string name="msg_channels">Räume</string> <string name="msg_channels">Räume</string>
<string name="msg_users">Users</string> <!-- TODO Translate --> <string name="msg_users">Benutzer</string>
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate --> <string name="msg_search_for_global_users">Suche nach globalen Benutzern</string>
<string name="msg_search_for_global_users_description">If you turn on, you can search for any user from others companies or servers.</string> <!-- TODO Translate --> <string name="msg_search_for_global_users_description">Wenn Sie dies einschalten, können Sie nach Benutzern von anderen Unternehmen oder Servern suchen.</string>
<string name="header_private_groups">Private Räume</string> <string name="header_private_groups">Private Räume</string>
<string name="header_direct_messages">Direkt Nachrichten</string> <string name="header_direct_messages">Direkt Nachrichten</string>
<string name="header_live_chats">Live Chats</string> <string name="header_live_chats">Live Chats</string>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<string name="action_use_this_username">Использовать это имя</string> <string name="action_use_this_username">Использовать это имя</string>
<string name="action_terms_of_service">Условия использования</string> <string name="action_terms_of_service">Условия использования</string>
<string name="action_privacy_policy">Политика конфиденциальности</string> <string name="action_privacy_policy">Политика конфиденциальности</string>
<string name="action_new_channel">New channel</string> <!-- TODO Translate --> <string name="action_new_channel">Новый канал</string>
<string name="action_search">Поиск</string> <string name="action_search">Поиск</string>
<string name="action_update">Обновить</string> <string name="action_update">Обновить</string>
<string name="action_settings">Настройки</string> <string name="action_settings">Настройки</string>
...@@ -60,18 +60,18 @@ ...@@ -60,18 +60,18 @@
<string name="action_remove_favorite">Удалить из избранного</string> <string name="action_remove_favorite">Удалить из избранного</string>
<!-- Settings messages --> <!-- Settings messages -->
<string name="msg_contact_us">Contact us</string> <!-- TODO Translate --> <string name="msg_contact_us">Связаться с нами</string>
<string name="msg_language">Language</string> <!-- TODO Translate --> <string name="msg_language">Изменить язык</string>
<string name="msg_review_this_app">Review this app</string> <!-- TODO Translate --> <string name="msg_review_this_app">Оставить отзыв</string>
<string name="msg_share_this_app">Share this app</string> <!-- TODO Translate --> <string name="msg_share_this_app">Поделиться приложением</string>
<string name="msg_administration">Administration</string> <!-- TODO Translate --> <string name="msg_administration">Панель админа</string>
<string name="msg_license">License</string> <!-- TODO Translate --> <string name="msg_license">Лицензия</string>
<string name="msg_app_version">Version: %1$s (%2$d)</string> <!-- TODO Translate --> <string name="msg_app_version">Версия программы: %1$s (%2$d)</string>
<string name="msg_server_version">Server version: %1$s</string> <!-- TODO Translate --> <string name="msg_server_version">Версия сервера: %1$s</string>
<string name="msg_send_analytics">Send analytics</string> <!-- TODO Translate --> <string name="msg_send_analytics">Отправка аналитики</string>
<string name="msg_logout_from_rocket_chat">Logout from Rocket.Chat</string> <!-- TODO Translate --> <string name="msg_logout_from_rocket_chat">Выйти из Rocket.Chat</string>
<string name="msg_delete_account">Delete account</string> <!-- TODO Translate --> <string name="msg_delete_account">Удалить аккаунт</string>
<string name="msg_change_status">Change status</string> <!-- TODO Translate --> <string name="msg_change_status">Изменить статус</string>
<!-- Regular information messages --> <!-- Regular information messages -->
<string name="msg_generic_error">Произошла ошибка, повторите попытку.</string> <string name="msg_generic_error">Произошла ошибка, повторите попытку.</string>
...@@ -179,11 +179,11 @@ ...@@ -179,11 +179,11 @@
<item quantity="many">%1$s реагируют с %2$s</item> <item quantity="many">%1$s реагируют с %2$s</item>
</plurals> </plurals>
<string name="msg_credentials_saved_successfully">Учетные данные успешно сохранены</string> <string name="msg_credentials_saved_successfully">Учетные данные успешно сохранены</string>
<string name="msg_camera_permission_denied">Camera permission is needed to open camera.</string> <!-- TODO Add translation --> <string name="msg_camera_permission_denied">Необходимо разрешение на использование камеры</string>
<string name="msg_storage_permission_denied">Storage permission is needed to open Drawing.</string> <!-- TODO Add translation --> <string name="msg_storage_permission_denied">Необходимо разрешение на использование хранилища</string>
<string name="msg_server">Server</string> <!-- TODO Translate --> <string name="msg_server">Сервер</string>
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate --> <string name="msg_add_new_server">Добавить новый сервер</string>
<string name="msg_directory">Directory</string> <!-- TODO Translate --> <string name="msg_directory">Директория</string>
<!-- Create channel messages --> <!-- Create channel messages -->
<string name="msg_private_channel">Приватный</string> <string name="msg_private_channel">Приватный</string>
...@@ -311,20 +311,20 @@ ...@@ -311,20 +311,20 @@
<string name="alert_title_default_skin_tone">Тон кожи по умолчанию</string> <string name="alert_title_default_skin_tone">Тон кожи по умолчанию</string>
<!-- Sort and group --> <!-- Sort and group -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate --> <string name="msg_sort_by_placeholder">Сортировать по %1$s</string>
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate --> <string name="msg_sort_by">Сортировать по</string>
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate --> <string name="msg_sort_by_activity">Активности</string>
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate --> <string name="msg_sort_by_name">Имени</string>
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate --> <string name="msg_group_by_unread_on_top">Непрочитанные сверху</string>
<string name="msg_group_by_type">Group by type</string> <!-- TODO Translate --> <string name="msg_group_by_type">Группировать по типу</string>
<string name="msg_group_by_favorites">Group by favorites</string> <!-- TODO Translate --> <string name="msg_group_by_favorites">Группировать по избранному</string>
<!--ChatRooms Headers--> <!--ChatRooms Headers-->
<string name="header_favorite">Избранные</string> <string name="header_favorite">Избранные</string>
<string name="msg_channels">Каналы</string> <string name="msg_channels">Каналы</string>
<string name="msg_users">Users</string> <!-- TODO Translate --> <string name="msg_users">Пользователи</string>
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate --> <string name="msg_search_for_global_users">Поиск глобальных пользователей</string>
<string name="msg_search_for_global_users_description">If you turn on, you can search for any user from others companies or servers.</string> <!-- TODO Translate --> <string name="msg_search_for_global_users_description">При активации станет возможен поиск любого пользователя из других компаний или серверов.</string>
<string name="header_private_groups">Приватные каналы</string> <string name="header_private_groups">Приватные каналы</string>
<string name="header_direct_messages">Личная переписка</string> <string name="header_direct_messages">Личная переписка</string>
<string name="header_live_chats">Живые чаты</string> <string name="header_live_chats">Живые чаты</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