Commit 2ce0f091 authored by Łukasz Rutkowski's avatar Łukasz Rutkowski

Set members list toolbar title immediately

parent f6b95022
...@@ -66,6 +66,7 @@ class MembersFragment : Fragment(), MembersView { ...@@ -66,6 +66,7 @@ class MembersFragment : Fragment(), MembersView {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
setupToolbar()
setupRecyclerView() setupRecyclerView()
presenter.loadChatRoomsMembers(chatRoomId) presenter.loadChatRoomsMembers(chatRoomId)
...@@ -125,9 +126,13 @@ class MembersFragment : Fragment(), MembersView { ...@@ -125,9 +126,13 @@ class MembersFragment : Fragment(), MembersView {
} }
} }
private fun setupToolbar(totalMembers: Long) { private fun setupToolbar(totalMembers: Long? = null) {
(activity as ChatRoomActivity).let { (activity as ChatRoomActivity).let {
it.showToolbarTitle(getString(R.string.title_members, totalMembers)) if (totalMembers != null) {
it.showToolbarTitle(getString(R.string.title_counted_members, totalMembers))
} else {
it.showToolbarTitle(getString(R.string.title_members))
}
it.hideToolbarChatRoomIcon() it.hideToolbarChatRoomIcon()
} }
} }
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Legal Terms</string> <string name="title_legal_terms">Legal Terms</string>
<string name="title_chats">Chats</string> <string name="title_chats">Chats</string>
<string name="title_profile">Profil</string> <string name="title_profile">Profil</string>
<string name="title_members">Benutzer (%d)</string> <string name="title_members">Benutzer</string>
<string name="title_counted_members">Benutzer (%d)</string>
<string name="title_settings">Einstellungen</string> <string name="title_settings">Einstellungen</string>
<string name="title_preferences">Preferences</string> <!-- TODO Add translation --> <string name="title_preferences">Preferences</string> <!-- TODO Add translation -->
<string name="title_change_password">Ändere Passwort</string> <string name="title_change_password">Ändere Passwort</string>
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
<string name="title_legal_terms">Términos legales</string> <string name="title_legal_terms">Términos legales</string>
<string name="title_chats">Chats</string> <string name="title_chats">Chats</string>
<string name="title_profile">Perfil</string> <string name="title_profile">Perfil</string>
<string name="title_members">Miembros (%d)</string> <string name="title_members">Miembros)</string>
<string name="title_counted_members">Miembros (%d)</string>
<string name="title_settings">Configuraciones</string> <string name="title_settings">Configuraciones</string>
<string name="title_preferences">Preferences</string> <!-- TODO Add translation --> <string name="title_preferences">Preferences</string> <!-- TODO Add translation -->
<string name="title_change_password">Cambia la contraseña</string> <string name="title_change_password">Cambia la contraseña</string>
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Termes juridiques</string> <string name="title_legal_terms">Termes juridiques</string>
<string name="title_chats">Chats</string> <string name="title_chats">Chats</string>
<string name="title_profile">Profil</string> <string name="title_profile">Profil</string>
<string name="title_members">Membres (%d)</string> <string name="title_members">Membres</string>
<string name="title_counted_members">Membres (%d)</string>
<string name="title_settings">Paramètres</string> <string name="title_settings">Paramètres</string>
<string name="title_preferences">Préférences</string> <string name="title_preferences">Préférences</string>
<string name="title_change_password">Changer le mot de passe</string> <string name="title_change_password">Changer le mot de passe</string>
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">कानूनी शर्तें</string> <string name="title_legal_terms">कानूनी शर्तें</string>
<string name="title_chats">चैट</string> <string name="title_chats">चैट</string>
<string name="title_profile">प्रोफाइल</string> <string name="title_profile">प्रोफाइल</string>
<string name="title_members">सदस्य (%d)</string> <string name="title_members">सदस्य</string>
<string name="title_counted_members">सदस्य (%d)</string>
<string name="title_settings">सेटिंग्स</string> <string name="title_settings">सेटिंग्स</string>
<string name="title_preferences">प्राथमिकताएँ</string> <string name="title_preferences">प्राथमिकताएँ</string>
<string name="title_change_password">पासवर्ड बदलें</string> <string name="title_change_password">पासवर्ड बदलें</string>
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
<string name="title_legal_terms">Legal Terms</string> <string name="title_legal_terms">Legal Terms</string>
<string name="title_chats">チャット</string> <string name="title_chats">チャット</string>
<string name="title_profile">プロフィール</string> <string name="title_profile">プロフィール</string>
<string name="title_members">メンバー (%d)</string> <string name="title_members">メンバー</string>
<string name="title_counted_members">メンバー (%d)</string>
<string name="title_settings">設定</string> <string name="title_settings">設定</string>
<string name="title_preferences">Preferences</string> <!-- TODO Add translation --> <string name="title_preferences">Preferences</string> <!-- TODO Add translation -->
<string name="title_change_password">Change Password</string> <!-- TODO Add translation --> <string name="title_change_password">Change Password</string> <!-- TODO Add translation -->
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Termos Legais</string> <string name="title_legal_terms">Termos Legais</string>
<string name="title_chats">Chats</string> <string name="title_chats">Chats</string>
<string name="title_profile">Perfil</string> <string name="title_profile">Perfil</string>
<string name="title_members">Membros (%d)</string> <string name="title_members">Membros</string>
<string name="title_counted_members">Membros (%d)</string>
<string name="title_settings">Configurações</string> <string name="title_settings">Configurações</string>
<string name="title_preferences">Preferencias</string> <string name="title_preferences">Preferencias</string>
<string name="title_change_password">Alterar senha</string> <string name="title_change_password">Alterar senha</string>
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Юридические условия</string> <string name="title_legal_terms">Юридические условия</string>
<string name="title_chats">Чаты</string> <string name="title_chats">Чаты</string>
<string name="title_profile">Профиль</string> <string name="title_profile">Профиль</string>
<string name="title_members">Пользователи (%d)</string> <string name="title_members">Пользователи</string>
<string name="title_counted_members">Пользователи (%d)</string>
<string name="title_settings">Настройки</string> <string name="title_settings">Настройки</string>
<string name="title_preferences">Персональные</string> <string name="title_preferences">Персональные</string>
<string name="title_change_password">Изменить пароль</string> <string name="title_change_password">Изменить пароль</string>
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Yasal Şartlar</string> <string name="title_legal_terms">Yasal Şartlar</string>
<string name="title_chats">Sohbetler</string> <string name="title_chats">Sohbetler</string>
<string name="title_profile">Profil</string> <string name="title_profile">Profil</string>
<string name="title_members">Üyeler (%d)</string> <string name="title_members">Üyeler</string>
<string name="title_counted_members">Üyeler (%d)</string>
<string name="title_settings">Ayarlar</string> <string name="title_settings">Ayarlar</string>
<string name="title_preferences">Tercihler</string> <string name="title_preferences">Tercihler</string>
<string name="title_change_password">Şifre Değişikliği</string> <string name="title_change_password">Şifre Değişikliği</string>
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<string name="title_legal_terms">Юридичні умови</string> <string name="title_legal_terms">Юридичні умови</string>
<string name="title_chats">Чати</string> <string name="title_chats">Чати</string>
<string name="title_profile">Профіль</string> <string name="title_profile">Профіль</string>
<string name="title_members">Користувачі (%d)</string> <string name="title_members">Користувачі</string>
<string name="title_counted_members">Користувачі (%d)</string>
<string name="title_settings">Налаштування</string> <string name="title_settings">Налаштування</string>
<string name="title_preferences">Персональні</string> <string name="title_preferences">Персональні</string>
<string name="title_change_password">Змінити пароль</string> <string name="title_change_password">Змінити пароль</string>
......
...@@ -22,7 +22,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin ...@@ -22,7 +22,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="title_legal_terms">Legal Terms</string> <string name="title_legal_terms">Legal Terms</string>
<string name="title_chats">Chats</string> <string name="title_chats">Chats</string>
<string name="title_profile">Profile</string> <string name="title_profile">Profile</string>
<string name="title_members">Members (%d)</string> <string name="title_members">Members</string>
<string name="title_counted_members">Members (%d)</string>
<string name="title_settings">Settings</string> <string name="title_settings">Settings</string>
<string name="title_preferences">Preferences</string> <string name="title_preferences">Preferences</string>
<string name="title_change_password">Change Password</string> <string name="title_change_password">Change Password</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