Commit 0bb00cbc authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Adds directory feature

parent d9f8a831
......@@ -27,4 +27,5 @@ sealed class ScreenViewEvent(val screenName: String) {
object Preferences : ScreenViewEvent("PreferencesFragment")
object Profile : ScreenViewEvent("ProfileFragment")
object Settings : ScreenViewEvent("SettingsFragment")
object Directory : ScreenViewEvent("DirectoryFragment")
}
......@@ -167,7 +167,7 @@ class RoomUiModelMapper(
private fun roomType(type: String): String = with(context.resources) {
when (type) {
RoomType.CHANNEL -> getString(R.string.header_channel)
RoomType.CHANNEL -> getString(R.string.msg_channels)
RoomType.PRIVATE_GROUP -> getString(R.string.header_private_groups)
RoomType.DIRECT_MESSAGE -> getString(R.string.header_direct_messages)
RoomType.LIVECHAT -> getString(R.string.header_live_chats)
......
......@@ -50,6 +50,8 @@ class ChatRoomsPresenter @Inject constructor(
fun toSettings() = navigator.toSettings()
fun toDirectory() = navigator.toDirectory()
fun getCurrentServerName() = view.setupToolbar(currentServer)
fun getSortingAndGroupingPreferences() {
......
......@@ -9,6 +9,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.SearchView
import androidx.core.view.isGone
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
......@@ -44,7 +45,6 @@ internal const val TAG_CHAT_ROOMS_FRAGMENT = "ChatRoomsFragment"
private const val BUNDLE_CHAT_ROOM_ID = "BUNDLE_CHAT_ROOM_ID"
fun newInstance(chatRoomId: String?): Fragment = ChatRoomsFragment().apply {
arguments = Bundle(1).apply {
putString(BUNDLE_CHAT_ROOM_ID, chatRoomId)
......@@ -103,6 +103,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
with((activity as AppCompatActivity)) {
with(toolbar) {
setSupportActionBar(this)
supportActionBar?.setDisplayShowTitleEnabled(false)
setNavigationOnClickListener { presenter.toSettings() }
}
}
......@@ -122,10 +123,10 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
if (isSortByName) {
text_sort_by.text =
getString(R.string.msg_sort_by, getString(R.string.msg_sort_by_name).toLowerCase())
getString(R.string.msg_sort_by_placeholder, getString(R.string.msg_sort_by_name).toLowerCase())
} else {
text_sort_by.text = getString(
R.string.msg_sort_by,
R.string.msg_sort_by_placeholder,
getString(R.string.msg_sort_by_activity).toLowerCase()
)
}
......@@ -149,12 +150,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
// We need to show all the menu items here by invalidating the options to recreate the entire menu.
activity?.invalidateOptionsMenu()
queryChatRoomsByName(null)
hideDirectoryView()
return true
}
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
// We need to hide the all the menu items here.
menu.findItem(R.id.action_new_channel).isVisible = false
showDirectoryView()
return true
}
})
......@@ -282,6 +285,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
chat.rocket.android.sortingandgrouping.ui.TAG
)
}
text_directory.setOnClickListener { presenter.toDirectory() }
}
fun sortChatRoomsList(
......@@ -305,7 +310,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
}
private fun changeSortByTitle(text: String) {
text_sort_by.text = getString(R.string.msg_sort_by, text.toLowerCase())
text_sort_by.text = getString(R.string.msg_sort_by_placeholder, text.toLowerCase())
}
private fun queryChatRoomsByName(name: String?): Boolean {
......@@ -324,4 +329,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
viewModel.setQuery(Query.ByActivity(isGroupByType))
}
}
private fun showDirectoryView() {
text_directory.isVisible = true
text_sort_by.isGone = true
}
private fun hideDirectoryView() {
text_directory.isGone = true
text_sort_by.isVisible = true
}
}
......@@ -19,6 +19,7 @@ import chat.rocket.android.chatroom.ui.ChatRoomActivity
import chat.rocket.android.chatrooms.di.ChatRoomsFragmentProvider
import chat.rocket.android.createchannel.di.CreateChannelProvider
import chat.rocket.android.dagger.scope.PerActivity
import chat.rocket.android.directory.di.DirectoryFragmentProvider
import chat.rocket.android.draw.main.di.DrawModule
import chat.rocket.android.draw.main.ui.DrawingActivity
import chat.rocket.android.favoritemessages.di.FavoriteMessagesFragmentProvider
......@@ -70,7 +71,8 @@ abstract class ActivityBuilder {
CreateChannelProvider::class,
ProfileFragmentProvider::class,
SettingsFragmentProvider::class,
AdminPanelWebViewFragmentProvider::class
AdminPanelWebViewFragmentProvider::class,
DirectoryFragmentProvider::class
]
)
abstract fun bindMainActivity(): MainActivity
......
package chat.rocket.android.directory.adapter
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.R
import chat.rocket.android.directory.uimodel.DirectoryUiModel
import chat.rocket.android.util.extensions.inflate
private const val VIEW_TYPE_CHANNELS = 0
private const val VIEW_TYPE_USERS = 1
private const val VIEW_TYPE_GLOBAL_USERS = 2
class DirectoryAdapter(private val selector: Selector) :
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
private var isSortByChannels: Boolean = true
private var isSearchForGlobalUsers: Boolean = true
private var dataSet: List<DirectoryUiModel> = ArrayList()
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder =
when (viewType) {
VIEW_TYPE_CHANNELS -> DirectoryChannelViewHolder(
parent.inflate(R.layout.item_directory_channel)
)
VIEW_TYPE_USERS -> DirectoryUsersViewHolder(
parent.inflate(R.layout.item_directory_user)
)
VIEW_TYPE_GLOBAL_USERS -> DirectoryGlobalUsersViewHolder(
parent.inflate(R.layout.item_directory_user)
)
else -> throw IllegalStateException("viewType must be either VIEW_TYPE_CHANNELS, VIEW_TYPE_USERS or VIEW_TYPE_GLOBAL_USERS")
}
override fun getItemCount(): Int = dataSet.size
override fun getItemViewType(position: Int): Int {
return if (isSortByChannels) {
VIEW_TYPE_CHANNELS
} else {
if (isSearchForGlobalUsers) {
VIEW_TYPE_GLOBAL_USERS
} else {
VIEW_TYPE_USERS
}
}
}
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) =
when (holder) {
is DirectoryChannelViewHolder -> bindDirectoryChannelViewHolder(holder, position)
is DirectoryUsersViewHolder -> bindDirectoryUsersViewHolder(holder, position)
is DirectoryGlobalUsersViewHolder -> bindDirectoryGlobalUsersViewHolder(
holder,
position
)
else -> throw IllegalStateException("Unable to bind ViewHolder. ViewHolder must be either DirectoryChannelViewHolder, DirectoryUsersViewHolder or DirectoryGlobalUsersViewHolder")
}
private fun bindDirectoryChannelViewHolder(holder: DirectoryChannelViewHolder, position: Int) {
with(dataSet[position]) {
holder.bind(this)
holder.itemView.setOnClickListener { selector.onChannelSelected(id, name) }
}
}
private fun bindDirectoryUsersViewHolder(holder: DirectoryUsersViewHolder, position: Int) {
with(dataSet[position]) {
holder.bind(this)
holder.itemView.setOnClickListener { selector.onUserSelected(username, name) }
}
}
private fun bindDirectoryGlobalUsersViewHolder(
holder: DirectoryGlobalUsersViewHolder,
position: Int
) {
with(dataSet[position]) {
holder.bind(this)
holder.itemView.setOnClickListener { selector.onGlobalUserSelected(username, name) }
}
}
fun clearData() {
dataSet = emptyList()
notifyDataSetChanged()
}
fun setSorting(isSortByChannels: Boolean, isSearchForGlobalUsers: Boolean) {
this.isSortByChannels = isSortByChannels
this.isSearchForGlobalUsers = isSearchForGlobalUsers
}
fun prependData(dataSet: List<DirectoryUiModel>) {
this.dataSet = dataSet
notifyItemRangeInserted(0, dataSet.size)
}
fun appendData(dataSet: List<DirectoryUiModel>) {
val previousDataSetSize = this.dataSet.size
this.dataSet += dataSet
notifyItemRangeInserted(previousDataSetSize, dataSet.size)
}
}
interface Selector {
fun onChannelSelected(channelId: String, channelName: String)
fun onUserSelected(username: String, name: String)
fun onGlobalUserSelected(username: String, name: String)
}
\ No newline at end of file
package chat.rocket.android.directory.adapter
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.directory.uimodel.DirectoryUiModel
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.item_directory_channel.view.*
class DirectoryChannelViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
fun bind(directoryChannelUiModel: DirectoryUiModel) = with(itemView) {
Glide.with(image_avatar).load(directoryChannelUiModel.channelAvatarUri).into(image_avatar)
text_channel_name.text = directoryChannelUiModel.name
text_channel_description.text = directoryChannelUiModel.description
text_channel_total_members.text = directoryChannelUiModel.totalMembers
}
}
\ No newline at end of file
package chat.rocket.android.directory.adapter
import android.view.View
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.directory.uimodel.DirectoryUiModel
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.item_directory_user.view.*
class DirectoryGlobalUsersViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
fun bind(directoryChannelUiModel: DirectoryUiModel) = with(itemView) {
Glide.with(image_avatar).load(directoryChannelUiModel.userAvatarUri).into(image_avatar)
text_user_name.text = directoryChannelUiModel.name
text_user_username.text = directoryChannelUiModel.username
with(text_server_url) {
text = directoryChannelUiModel.serverUrl
isVisible = true
}
}
}
\ No newline at end of file
package chat.rocket.android.directory.adapter
import android.view.View
import androidx.core.view.isGone
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.directory.uimodel.DirectoryUiModel
import com.bumptech.glide.Glide
import kotlinx.android.synthetic.main.item_directory_user.view.*
class DirectoryUsersViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
fun bind(directoryChannelUiModel: DirectoryUiModel) = with(itemView) {
Glide.with(image_avatar).load(directoryChannelUiModel.userAvatarUri).into(image_avatar)
text_user_name.text = directoryChannelUiModel.name
text_user_username.text = directoryChannelUiModel.username
text_server_url.isGone = true
}
}
\ No newline at end of file
package chat.rocket.android.directory.di
import chat.rocket.android.dagger.scope.PerFragment
import chat.rocket.android.directory.presentation.DirectoryView
import chat.rocket.android.directory.ui.DirectoryFragment
import dagger.Module
import dagger.Provides
@Module
class DirectoryFragmentModule {
@Provides
@PerFragment
fun directoryView(frag: DirectoryFragment): DirectoryView = frag
}
\ No newline at end of file
package chat.rocket.android.directory.di
import chat.rocket.android.dagger.scope.PerFragment
import chat.rocket.android.directory.ui.DirectoryFragment
import dagger.Module
import dagger.android.ContributesAndroidInjector
@Module
abstract class DirectoryFragmentProvider {
@ContributesAndroidInjector(modules = [DirectoryFragmentModule::class])
@PerFragment
abstract fun provideDirectoryFragment(): DirectoryFragment
}
\ No newline at end of file
package chat.rocket.android.directory.presentation
import chat.rocket.android.chatrooms.domain.FetchChatRoomsInteractor
import chat.rocket.android.core.lifecycle.CancelStrategy
import chat.rocket.android.db.DatabaseManager
import chat.rocket.android.db.model.ChatRoomEntity
import chat.rocket.android.directory.uimodel.DirectoryUiModelMapper
import chat.rocket.android.helper.UserHelper
import chat.rocket.android.main.presentation.MainNavigator
import chat.rocket.android.server.infraestructure.RocketChatClientFactory
import chat.rocket.android.util.extension.launchUI
import chat.rocket.common.model.RoomType
import chat.rocket.common.model.roomTypeOf
import chat.rocket.common.util.ifNull
import chat.rocket.core.RocketChatClient
import chat.rocket.core.internal.rest.DirectoryRequestType
import chat.rocket.core.internal.rest.DirectoryWorkspaceType
import chat.rocket.core.internal.rest.createDirectMessage
import chat.rocket.core.internal.rest.directory
import chat.rocket.core.internal.rest.getInfo
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Named
class DirectoryPresenter @Inject constructor(
private val view: DirectoryView,
private val navigator: MainNavigator,
private val strategy: CancelStrategy,
@Named("currentServer") private val currentServer: String,
private val dbManager: DatabaseManager,
private val userHelper: UserHelper,
val factory: RocketChatClientFactory,
private val mapper: DirectoryUiModelMapper
) {
private val client: RocketChatClient = factory.get(currentServer)
private var offset: Long = 0
fun loadAllDirectoryChannels() {
launchUI(strategy) {
try {
view.showLoading()
val directoryResult = client.directory(
directoryRequestType = DirectoryRequestType.Channels(),
offset = offset,
count = 60
)
val directoryUiModels = mapper.mapToUiModelList(directoryResult.result)
view.showChannels(directoryUiModels)
offset += 1 * 60L
} catch (exception: Exception) {
exception.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} finally {
view.hideLoading()
}
}
}
fun loadAllDirectoryUsers(isSearchForGlobalUsers: Boolean) {
launchUI(strategy) {
try {
view.showLoading()
val directoryResult = client.directory(
directoryRequestType = DirectoryRequestType.Users(),
directoryWorkspaceType = if (isSearchForGlobalUsers) DirectoryWorkspaceType.All() else DirectoryWorkspaceType.Local(),
offset = offset,
count = 60
)
val directoryUiModels = mapper.mapToUiModelList(directoryResult.result)
view.showUsers(directoryUiModels)
offset += 1 * 60L
} catch (exception: Exception) {
exception.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} finally {
view.hideLoading()
}
}
}
fun updateSorting(isSortByChannels: Boolean, isSearchForGlobalUsers: Boolean) {
resetOffset()
if (isSortByChannels) {
loadAllDirectoryChannels()
} else {
loadAllDirectoryUsers(isSearchForGlobalUsers)
}
}
fun toChannel(channelId: String, name: String) {
launchUI(strategy) {
try {
view.showLoading()
withContext(Dispatchers.Default) {
val chatRoom = client.getInfo(channelId, name, roomTypeOf(RoomType.CHANNEL))
navigator.toChatRoom(
chatRoomId = channelId,
chatRoomName = name,
chatRoomType = RoomType.CHANNEL,
isReadOnly = chatRoom.readonly,
chatRoomLastSeen = -1,
isSubscribed = false,
isCreator = false,
isFavorite = false
)
}
} catch (ex: Exception) {
Timber.e(ex)
ex.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} finally {
view.hideLoading()
}
}
}
fun tiDirectMessage(username: String, name: String) {
launchUI(strategy) {
try {
view.showLoading()
withContext(Dispatchers.Default) {
val directMessage = client.createDirectMessage(username)
val chatRoomEntity = ChatRoomEntity(
id = directMessage.id,
name = username,
description = null,
type = RoomType.DIRECT_MESSAGE,
fullname = name,
subscriptionId = "",
updatedAt = directMessage.updatedAt
)
dbManager.insertOrReplaceRoom(chatRoomEntity)
FetchChatRoomsInteractor(client, dbManager).refreshChatRooms()
navigator.toChatRoom(
chatRoomId = chatRoomEntity.id,
chatRoomName = chatRoomEntity.name,
chatRoomType = chatRoomEntity.type,
isReadOnly = false,
chatRoomLastSeen = -1,
isSubscribed = chatRoomEntity.open,
isCreator = true,
isFavorite = false
)
}
} catch (ex: Exception) {
Timber.e(ex)
ex.message?.let {
view.showMessage(it)
}.ifNull {
view.showGenericErrorMessage()
}
} finally {
view.hideLoading()
}
}
}
private fun resetOffset() {
offset = 0
}
}
\ No newline at end of file
package chat.rocket.android.directory.presentation
import chat.rocket.android.core.behaviours.LoadingView
import chat.rocket.android.core.behaviours.MessageView
import chat.rocket.android.directory.uimodel.DirectoryUiModel
interface DirectoryView : MessageView, LoadingView {
/**
* Shows the list of directory channels.
*
* @param dataSet The data set to show.
*/
fun showChannels(dataSet: List<DirectoryUiModel>)
/**
* Shows the list of directory users.
*
* @param dataSet The data set to show.
*/
fun showUsers(dataSet: List<DirectoryUiModel>)
}
\ No newline at end of file
package chat.rocket.android.directory.ui
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import chat.rocket.android.R
import chat.rocket.android.analytics.AnalyticsManager
import chat.rocket.android.analytics.event.ScreenViewEvent
import chat.rocket.android.directory.adapter.DirectoryAdapter
import chat.rocket.android.directory.adapter.Selector
import chat.rocket.android.directory.presentation.DirectoryPresenter
import chat.rocket.android.directory.presentation.DirectoryView
import chat.rocket.android.directory.uimodel.DirectoryUiModel
import chat.rocket.android.helper.EndlessRecyclerViewScrollListener
import chat.rocket.android.util.extensions.inflate
import chat.rocket.android.util.extensions.showToast
import chat.rocket.android.util.extensions.ui
import dagger.android.support.AndroidSupportInjection
import kotlinx.android.synthetic.main.app_bar.*
import kotlinx.android.synthetic.main.fragment_directory.*
import kotlinx.android.synthetic.main.fragment_settings.view_loading
import javax.inject.Inject
internal const val TAG_DIRECTORY_FRAGMENT = "DirectoryFragment"
fun newInstance(): Fragment = DirectoryFragment()
class DirectoryFragment : Fragment(), DirectoryView {
@Inject lateinit var analyticsManager: AnalyticsManager
@Inject lateinit var presenter: DirectoryPresenter
private var isSortByChannels: Boolean = true
private var isSearchForGlobalUsers: Boolean = false
private val linearLayoutManager = LinearLayoutManager(context)
private val directoryAdapter = DirectoryAdapter(object : Selector {
override fun onChannelSelected(channelId: String, channelName: String) {
presenter.toChannel(channelId, channelName)
}
override fun onUserSelected(username: String, name: String) {
presenter.tiDirectMessage(username, name)
}
override fun onGlobalUserSelected(username: String, name: String) {
presenter.tiDirectMessage(username, name)
}
})
private val hashtagDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_hashtag_16dp, text_sort_by.context)
}
private val userDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_user_16dp, text_sort_by.context)
}
private val arrowDownDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_arrow_down, text_sort_by.context)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
AndroidSupportInjection.inject(this)
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? = container?.inflate(R.layout.fragment_directory)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setupToolbar()
setupRecyclerView()
setupListeners()
presenter.loadAllDirectoryChannels()
analyticsManager.logScreenView(ScreenViewEvent.Directory)
}
override fun showChannels(dataSet: List<DirectoryUiModel>) {
ui {
if (directoryAdapter.itemCount == 0) {
directoryAdapter.prependData(dataSet)
if (dataSet.size >= 60) {
recycler_view.addOnScrollListener(object :
EndlessRecyclerViewScrollListener(linearLayoutManager) {
override fun onLoadMore(
page: Int,
totalItemsCount: Int,
recyclerView: RecyclerView
) {
presenter.loadAllDirectoryChannels()
}
})
}
} else {
directoryAdapter.appendData(dataSet)
}
}
}
override fun showUsers(dataSet: List<DirectoryUiModel>) {
ui {
if (directoryAdapter.itemCount == 0) {
directoryAdapter.prependData(dataSet)
if (dataSet.size >= 60) {
recycler_view.addOnScrollListener(object :
EndlessRecyclerViewScrollListener(linearLayoutManager) {
override fun onLoadMore(
page: Int,
totalItemsCount: Int,
recyclerView: RecyclerView
) {
presenter.loadAllDirectoryUsers(isSearchForGlobalUsers)
}
})
}
} else {
directoryAdapter.appendData(dataSet)
}
}
}
override fun showMessage(resId: Int) {
ui { showToast(resId) }
}
override fun showMessage(message: String) {
ui { showToast(message) }
}
override fun showGenericErrorMessage() = showMessage(getString(R.string.msg_generic_error))
override fun showLoading() {
view_loading.isVisible = true
}
override fun hideLoading() {
view_loading.isVisible = false
}
fun updateSorting(isSortByChannels: Boolean, isSearchForGlobalUsers: Boolean) {
if (this.isSortByChannels != isSortByChannels ||
this.isSearchForGlobalUsers != isSearchForGlobalUsers
) {
this.isSortByChannels = isSortByChannels
this.isSearchForGlobalUsers = isSearchForGlobalUsers
updateSortByTitle()
with(directoryAdapter) {
clearData()
setSorting(isSortByChannels, isSearchForGlobalUsers)
}
presenter.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
}
private fun setupToolbar() {
with((activity as AppCompatActivity)) {
with(toolbar) {
setSupportActionBar(this)
title = getString(R.string.msg_directory)
setNavigationIcon(R.drawable.ic_arrow_back_white_24dp)
setNavigationOnClickListener { activity?.onBackPressed() }
}
}
}
private fun setupRecyclerView() {
ui {
with(recycler_view) {
layoutManager = linearLayoutManager
addItemDecoration(DividerItemDecoration(it, DividerItemDecoration.HORIZONTAL))
adapter = directoryAdapter
}
}
}
private fun setupListeners() {
text_sort_by.setOnClickListener {
activity?.supportFragmentManager?.let {
showDirectorySortingBottomSheetFragment(isSortByChannels, isSearchForGlobalUsers, it)
}
}
}
private fun updateSortByTitle() {
if (isSortByChannels) {
text_sort_by.text = getString(R.string.msg_channels)
DrawableHelper.compoundLeftAndRightDrawable(
text_sort_by,
hashtagDrawable,
arrowDownDrawable
)
} else {
text_sort_by.text = getString(R.string.msg_users)
DrawableHelper.compoundLeftAndRightDrawable(
text_sort_by,
userDrawable,
arrowDownDrawable
)
}
}
}
\ No newline at end of file
package chat.rocket.android.directory.ui
import DrawableHelper
import android.content.DialogInterface
import android.graphics.drawable.Drawable
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.FragmentManager
import chat.rocket.android.R
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import kotlinx.android.synthetic.main.bottom_seet_fragment_directory_sorting.*
fun showDirectorySortingBottomSheetFragment(
isSortByChannels: Boolean,
isSearchForGlobalUsers: Boolean,
supportFragmentManager: FragmentManager
) = DirectorySortingBottomSheetFragment().apply {
arguments = Bundle(2).apply {
putBoolean(BUNDLE_IS_SORT_BY_CHANNELS, isSortByChannels)
putBoolean(BUNDLE_IS_SEARCH_FOR_GLOBAL_USERS, isSearchForGlobalUsers)
}
}.show(supportFragmentManager, TAG)
internal const val TAG = "DirectorySortingBottomSheetFragment"
private const val BUNDLE_IS_SORT_BY_CHANNELS = "is_sort_by_channels"
private const val BUNDLE_IS_SEARCH_FOR_GLOBAL_USERS = "is_search_for_global_users"
class DirectorySortingBottomSheetFragment : BottomSheetDialogFragment() {
private var isSortByChannels = true
private var isSearchForGlobalUsers = false
private val hashtagDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_hashtag_16dp, requireContext())
}
private val userDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_user_16dp, requireContext())
}
private val checkDrawable by lazy {
DrawableHelper.getDrawableFromId(R.drawable.ic_check, requireContext())
}
private val directoryFragment by lazy {
activity?.supportFragmentManager?.findFragmentByTag(TAG_DIRECTORY_FRAGMENT) as DirectoryFragment
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
arguments?.run {
isSortByChannels = getBoolean(BUNDLE_IS_SORT_BY_CHANNELS)
isSearchForGlobalUsers = getBoolean(BUNDLE_IS_SEARCH_FOR_GLOBAL_USERS)
}
?: requireNotNull(arguments) { "no arguments supplied when the bottom sheet fragment was instantiated" }
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? =
inflater.inflate(R.layout.bottom_seet_fragment_directory_sorting, container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
setupView()
setupListeners()
}
override fun onCancel(dialog: DialogInterface?) {
super.onCancel(dialog)
directoryFragment.updateSorting(isSortByChannels, isSearchForGlobalUsers)
}
private fun setupView() {
if (isSortByChannels) {
checkSelection(text_channels, hashtagDrawable)
} else {
checkSelection(text_users, userDrawable)
}
switch_global_users.isChecked = isSearchForGlobalUsers
}
private fun setupListeners() {
text_channels.setOnClickListener {
checkSelection(text_channels, hashtagDrawable)
uncheckSelection(text_users, userDrawable)
isSortByChannels = true
}
text_users.setOnClickListener {
checkSelection(text_users, userDrawable)
uncheckSelection(text_channels, hashtagDrawable)
isSortByChannels = false
}
switch_global_users.setOnCheckedChangeListener { _, isChecked ->
isSearchForGlobalUsers = isChecked
}
}
private fun checkSelection(textView: TextView, leftDrawable: Drawable) {
context?.let {
DrawableHelper.compoundLeftAndRightDrawable(
textView,
leftDrawable,
checkDrawable
)
}
}
private fun uncheckSelection(textView: TextView, leftDrawable: Drawable) {
context?.let {
DrawableHelper.compoundLeftDrawable(
textView,
leftDrawable
)
}
}
}
\ No newline at end of file
package chat.rocket.android.directory.uimodel
import chat.rocket.android.util.extensions.avatarUrl
import chat.rocket.core.model.DirectoryResult
class DirectoryUiModel(
private val directoryResult: DirectoryResult,
private val baseUrl: String?
) {
val id: String = directoryResult.id
val channelAvatarUri: String?
val userAvatarUri: String?
val name: String = directoryResult.name
val username: String = "@${directoryResult.username}"
val serverUrl: String = "" // TODO
val description: String = "" // TODO
val totalMembers: String = "" // TODO
init {
channelAvatarUri = getChannelAvatar()
userAvatarUri = getUserAvatar()
}
private fun getChannelAvatar(): String? {
return baseUrl?.avatarUrl(name, isGroupOrChannel = true)
}
private fun getUserAvatar(): String? {
return directoryResult.username?.let {
baseUrl?.avatarUrl(it)
}
}
}
package chat.rocket.android.directory.uimodel
import chat.rocket.android.server.domain.GetSettingsInteractor
import chat.rocket.android.server.domain.baseUrl
import chat.rocket.core.model.DirectoryResult
import chat.rocket.core.model.Value
import javax.inject.Inject
import javax.inject.Named
class DirectoryUiModelMapper @Inject constructor(
getSettingsInteractor: GetSettingsInteractor,
@Named("currentServer") private val currentServer: String
) {
private var settings: Map<String, Value<Any>> = getSettingsInteractor.get(currentServer)
private val baseUrl = settings.baseUrl()
fun mapToUiModelList(directoryList: List<DirectoryResult>): List<DirectoryUiModel> {
return directoryList.map { DirectoryUiModel(it, baseUrl) }
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import chat.rocket.android.authentication.ui.newServerIntent
import chat.rocket.android.chatroom.ui.chatRoomIntent
import chat.rocket.android.chatrooms.ui.TAG_CHAT_ROOMS_FRAGMENT
import chat.rocket.android.createchannel.ui.TAG_CREATE_CHANNEL_FRAGMENT
import chat.rocket.android.directory.ui.TAG_DIRECTORY_FRAGMENT
import chat.rocket.android.main.ui.MainActivity
import chat.rocket.android.profile.ui.TAG_PROFILE_FRAGMENT
import chat.rocket.android.server.ui.changeServerIntent
......@@ -28,6 +29,12 @@ class MainNavigator(internal val activity: MainActivity) {
}
}
fun toDirectory() {
activity.addFragmentBackStack(TAG_DIRECTORY_FRAGMENT, R.id.fragment_container) {
chat.rocket.android.directory.ui.newInstance()
}
}
fun toCreateChannel() {
activity.addFragmentBackStack(TAG_CREATE_CHANNEL_FRAGMENT, R.id.fragment_container) {
chat.rocket.android.createchannel.ui.newInstance()
......
......@@ -15,10 +15,10 @@ class MembersAdapter(
) : RecyclerView.Adapter<MembersAdapter.ViewHolder>() {
private var dataSet: List<MemberUiModel> = ArrayList()
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MembersAdapter.ViewHolder =
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder =
ViewHolder(parent.inflate(R.layout.item_member))
override fun onBindViewHolder(holder: MembersAdapter.ViewHolder, position: Int) =
override fun onBindViewHolder(holder: ViewHolder, position: Int) =
holder.bind(dataSet[position], listener)
override fun getItemCount(): Int = dataSet.size
......
......@@ -102,15 +102,11 @@ class MembersFragment : Fragment(), MembersView {
}
override fun showMessage(resId: Int) {
ui {
showToast(resId)
}
ui { showToast(resId) }
}
override fun showMessage(message: String) {
ui {
showToast(message)
}
ui { showToast(message) }
}
override fun showGenericErrorMessage() = showMessage(getString(R.string.msg_generic_error))
......
......@@ -40,7 +40,6 @@ class ServersAdapter(
}
}
private fun bindServerViewHolder(holder: ServerViewHolder, position: Int) {
val account = servers[position]
holder.bind(account)
......
......@@ -140,7 +140,7 @@ class SortingAndGroupingBottomSheetFragment : BottomSheetDialogFragment(), Sorti
}
private fun changeSortByTitle(text: String) {
text_sort_by.text = getString(R.string.msg_sort_by, text.toLowerCase())
text_sort_by.text = getString(R.string.msg_sort_by_placeholder, text.toLowerCase())
}
private fun checkSelection(textView: TextView, @DrawableRes leftDrawable: Int) {
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="12dp"
android:height="7dp"
android:viewportWidth="12"
android:viewportHeight="7">
<path
android:fillColor="#EFEFEF"
android:fillType="nonZero"
android:pathData="M6,4.9512L10.4571,0.5122C10.7415,0.229 11.2013,0.229 11.4857,0.5122L11.4857,0.5122C11.7686,0.7939 11.7695,1.2516 11.4878,1.5345C11.4871,1.5352 11.4864,1.5359 11.4857,1.5366L6.7057,6.2972C6.3155,6.6858 5.6845,6.6858 5.2943,6.2972L0.5143,1.5366C0.2314,1.2549 0.2305,0.7972 0.5122,0.5143C0.5129,0.5136 0.5136,0.5129 0.5143,0.5122L0.5143,0.5122C0.7987,0.229 1.2585,0.229 1.5429,0.5122L3.5143,2.4756L6,4.9512Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:fillColor="#E8F2FF"
android:fillType="evenOdd"
android:pathData="M4,0L44,0A4,4 0,0 1,48 4L48,44A4,4 0,0 1,44 48L4,48A4,4 0,0 1,0 44L0,4A4,4 0,0 1,4 0z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillColor="#1D74F5"
android:fillType="nonZero"
android:pathData="M20.4021,27.5L18.3698,27.5C19.0883,28.6535 20.1515,29.57 21.4153,30.1057C20.9935,29.3908 20.6468,28.5043 20.4021,27.5ZM20.126,26C20.0438,25.3608 20,24.6906 20,24C20,23.4873 20.0241,22.9859 20.0702,22.5L17.5419,22.5C17.4304,22.982 17.3714,23.4841 17.3714,24C17.3714,24.697 17.479,25.3689 17.6785,26L20.126,26ZM20.2908,21C20.5358,19.7892 20.9248,18.7257 21.4153,17.8943C19.9739,18.5052 18.7934,19.6117 18.0876,21L20.2908,21ZM27.7092,21L29.9124,21C29.2066,19.6117 28.0261,18.5052 26.5847,17.8943C27.0752,18.7257 27.4642,19.7892 27.7092,21ZM27.9298,22.5C27.9759,22.9859 28,23.4873 28,24C28,24.6906 27.9562,25.3608 27.874,26L30.3215,26C30.521,25.3689 30.6286,24.697 30.6286,24C30.6286,23.4841 30.5696,22.982 30.4581,22.5L27.9298,22.5ZM27.5979,27.5C27.3532,28.5043 27.0065,29.3908 26.5847,30.1057C27.8485,29.57 28.9117,28.6535 29.6302,27.5L27.5979,27.5ZM21.8745,27.5C22.3155,29.3609 23.1025,30.6 24,30.6C24.8975,30.6 25.6845,29.3609 26.1255,27.5L21.8745,27.5ZM21.6127,26L26.3873,26C26.4606,25.3841 26.5,24.7291 26.5,24.05C26.5,23.516 26.4756,22.9969 26.4296,22.5L21.5704,22.5C21.5244,22.9969 21.5,23.516 21.5,24.05C21.5,24.7291 21.5394,25.3841 21.6127,26ZM21.787,21L26.213,21C25.7943,18.9188 24.9604,17.5 24,17.5C23.0396,17.5 22.2057,18.9188 21.787,21ZM24,32C19.5822,32 16,28.4178 16,24C16,19.5813 19.5822,16 24,16C28.4187,16 32,19.5813 32,24C32,28.4178 28.4187,32 24,32Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M3.7143,10.5714L3.7143,5.4286L0.8571,5.4286C0.3838,5.4286 0,5.0448 0,4.5714L0,4.5714C0,4.098 0.3838,3.7143 0.8571,3.7143L3.7143,3.7143L3.7143,0.8571C3.7143,0.3838 4.098,0 4.5714,0L4.5714,0C5.0448,0 5.4286,0.3838 5.4286,0.8571L5.4286,3.7143L10.5714,3.7143L10.5714,0.8571C10.5714,0.3838 10.9552,0 11.4286,0L11.4286,0C11.902,0 12.2857,0.3838 12.2857,0.8571L12.2857,3.7143L15.1429,3.7143C15.6162,3.7143 16,4.098 16,4.5714L16,4.5714C16,5.0448 15.6162,5.4286 15.1429,5.4286L12.2857,5.4286L12.2857,10.5714L15.1429,10.5714C15.6162,10.5714 16,10.9552 16,11.4286L16,11.4286C16,11.902 15.6162,12.2857 15.1429,12.2857L12.2857,12.2857L12.2857,15.1429C12.2857,15.6162 11.902,16 11.4286,16L11.4286,16C10.9552,16 10.5714,15.6162 10.5714,15.1429L10.5714,12.2857L5.4286,12.2857L5.4286,15.1429C5.4286,15.6162 5.0448,16 4.5714,16L4.5714,16C4.098,16 3.7143,15.6162 3.7143,15.1429L3.7143,12.2857L0.8571,12.2857C0.3838,12.2857 0,11.902 0,11.4286L0,11.4286C0,10.9552 0.3838,10.5714 0.8571,10.5714L3.7143,10.5714ZM5.4286,10.5714L10.5714,10.5714L10.5714,5.4286L5.4286,5.4286L5.4286,10.5714Z"
android:strokeWidth="1"
android:fillColor="#CBCBCC"
android:fillType="nonZero"
android:strokeColor="#00000000"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="15dp"
android:height="16dp"
android:viewportWidth="15"
android:viewportHeight="16">
<path
android:fillColor="#CBCBCC"
android:fillType="nonZero"
android:pathData="M1.5248,13.3289C1.7124,13.3993 1.9453,13.471 2.2276,13.5407C3.3824,13.8259 5.0297,14 7.25,14C9.4703,14 11.1176,13.8259 12.2724,13.5407C12.5547,13.471 12.7876,13.3993 12.9752,13.3289C12.8483,12.2275 12.2304,11.6229 11.0233,11.1185C10.8562,11.0486 10.6821,10.9818 10.4514,10.8975C10.5051,10.9171 10.0041,10.7357 9.8749,10.6871C8.6886,10.2409 8.125,9.817 8.1271,8.9552C8.1257,8.9352 8.1257,8.9352 8.1232,8.8835C8.1089,8.5412 8.1341,8.1482 8.2352,7.7544C8.3357,7.3629 8.5018,7.0212 8.7796,6.7313C9.4429,6.0859 9.75,5.4186 9.75,4.4169C9.75,2.7871 8.6092,1.5 7.25,1.5C5.8908,1.5 4.75,2.7871 4.75,4.4169C4.75,5.4177 5.0499,6.0675 5.7166,6.7436C5.9791,7.0111 6.1513,7.3472 6.2566,7.7298C6.3671,8.1314 6.3941,8.5324 6.3773,8.8838C6.3741,8.9408 6.3741,8.9408 6.375,8.8986C6.375,9.817 5.8114,10.2409 4.6251,10.6871C4.4959,10.7357 3.9949,10.9171 4.0486,10.8975C3.8179,10.9818 3.6438,11.0486 3.4767,11.1185C2.2696,11.6229 1.6517,12.2275 1.5248,13.3289ZM0,13.7878C0,11.6909 1.029,10.5156 2.8983,9.7344C3.0901,9.6543 3.2836,9.58 3.5339,9.4886C3.4888,9.505 3.978,9.3279 4.0971,9.2831C4.7164,9.0502 4.875,8.9309 4.8778,8.834C4.8775,8.8383 4.8775,8.8383 4.879,8.8121C4.8889,8.6053 4.8718,8.351 4.8104,8.1279C4.7676,7.9725 4.7093,7.8588 4.6472,7.7955C3.7195,6.8547 3.25,5.8375 3.25,4.4169C3.25,1.9963 5.0194,0 7.25,0C9.4806,0 11.25,1.9963 11.25,4.4169C11.25,5.8419 10.7679,6.8896 9.8447,7.7872C9.7867,7.8479 9.7298,7.9649 9.6881,8.1274C9.6297,8.3548 9.6132,8.6125 9.6219,8.8209C9.6231,8.8456 9.6231,8.8456 9.625,8.8986C9.625,8.9309 9.7836,9.0502 10.4029,9.2831C10.522,9.3279 11.0112,9.505 10.9661,9.4886C11.2164,9.58 11.4099,9.6543 11.6017,9.7344C13.471,10.5156 14.5,11.6909 14.5,13.7878L14.5,14.1647L14.1975,14.3896C13.9508,14.573 13.4546,14.7939 12.6319,14.997C11.351,15.3133 9.5847,15.5 7.25,15.5C4.9153,15.5 3.149,15.3133 1.8681,14.997C1.0454,14.7939 0.5492,14.573 0.3025,14.3896L0,14.1647L0,13.7878Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".directory.ui.DirectorySortingBottomSheetFragment">
<TextView
android:id="@+id/text_sort_by"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="@string/msg_sort_by"
android:textColor="#9EA2A8"
android:textSize="17sp"
android:textStyle="normal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view_divider_one"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:background="#1F000000"
app:layout_constraintTop_toBottomOf="@+id/text_sort_by" />
<TextView
android:id="@+id/text_channels"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_hashtag_16dp"
android:drawablePadding="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:text="@string/msg_channels"
android:textColor="#2F343D"
android:textSize="16sp"
android:textStyle="normal"
app:layout_constraintTop_toBottomOf="@+id/view_divider_one" />
<TextView
android:id="@+id/text_users"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_user_16dp"
android:drawablePadding="16dp"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:text="@string/msg_users"
android:textColor="#2F343D"
android:textSize="16sp"
android:textStyle="normal"
app:layout_constraintTop_toBottomOf="@+id/text_channels" />
<View
android:id="@+id/view_divider_two"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="#1F000000"
app:layout_constraintTop_toBottomOf="@+id/text_users" />
<TextView
android:id="@+id/text_search_for_global_users"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:text="@string/msg_search_for_global_users"
android:textColor="#2F343D"
android:textSize="16sp"
android:textStyle="normal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view_divider_two" />
<Switch
android:id="@+id/switch_global_users"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:checked="false"
app:layout_constraintBottom_toBottomOf="@+id/text_search_for_global_users"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/text_search_for_global_users" />
<TextView
android:id="@+id/text_search_for_global_users_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:text="@string/msg_search_for_global_users_description"
android:textColor="#9EA2A8"
android:textSize="14sp"
android:textStyle="normal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_search_for_global_users" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -13,7 +13,7 @@
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="@string/msg_sort_by"
android:text="@string/msg_sort_by_placeholder"
android:textColor="#9EA2A8"
android:textSize="17sp"
android:textStyle="normal" />
......
......@@ -11,6 +11,27 @@
layout="@layout/app_bar_chat_rooms"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/text_directory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_directory_48dp"
android:drawablePadding="10dp"
android:fontFamily="sans-serif"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingTop="32dp"
android:paddingEnd="16dp"
android:paddingBottom="32dp"
android:text="@string/msg_directory"
android:textColor="#0c0d0f"
android:textSize="17sp"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_app_bar_chat_room" />
<TextView
android:id="@+id/text_sort_by"
android:layout_width="match_parent"
......@@ -21,13 +42,13 @@
android:gravity="center_vertical"
android:paddingStart="@dimen/screen_edge_left_and_right_margins"
android:paddingEnd="@dimen/screen_edge_left_and_right_margins"
android:text="@string/msg_sort_by"
android:text="@string/msg_sort_by_placeholder"
android:textColor="#CBCED1"
android:textSize="14sp"
android:textStyle="normal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_app_bar_chat_room" />
app:layout_constraintTop_toBottomOf="@+id/text_directory" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".directory.ui.DirectoryFragment">
<include
android:id="@+id/layout_app_bar"
layout="@layout/app_bar"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/text_sort_by"
android:layout_width="match_parent"
android:layout_height="42dp"
android:background="#54585E"
android:drawableStart="@drawable/ic_hashtag_16dp"
android:drawableEnd="@drawable/ic_arrow_down"
android:drawablePadding="10dp"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical"
android:paddingStart="@dimen/screen_edge_left_and_right_margins"
android:paddingEnd="@dimen/screen_edge_left_and_right_margins"
android:text="@string/msg_channels"
android:textColor="#CBCED1"
android:textSize="14sp"
android:textStyle="normal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_app_bar" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_sort_by" />
<com.wang.avi.AVLoadingIndicatorView
android:id="@+id/view_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:indicatorColor="@color/colorBlack"
app:indicatorName="BallPulseIndicator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_sort_by"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:paddingStart="@dimen/screen_edge_left_and_right_padding"
android:paddingTop="8dp"
android:paddingEnd="@dimen/screen_edge_left_and_right_padding"
android:paddingBottom="8dp">
<ImageView
android:id="@+id/image_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars[6]" />
<TextView
android:id="@+id/text_channel_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="10dp"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textColor="#0c0d0f"
android:textSize="17sp"
android:textStyle="normal"
app:layout_constraintEnd_toStartOf="@+id/text_channel_total_members"
app:layout_constraintLeft_toRightOf="@+id/image_avatar"
app:layout_constraintStart_toEndOf="@+id/image_avatar"
app:layout_constraintTop_toTopOf="@+id/image_avatar"
tools:text="General" />
<TextView
android:id="@+id/text_channel_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:fontFamily="sans-serif"
android:maxLines="1"
android:textColor="#9ea2a8"
android:textSize="15sp"
android:textStyle="normal"
app:layout_constraintEnd_toStartOf="@+id/text_channel_total_members"
app:layout_constraintStart_toStartOf="@+id/text_channel_name"
app:layout_constraintTop_toBottomOf="@+id/text_channel_name"
tools:text="Community support" />
<TextView
android:id="@+id/text_channel_total_members"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:maxLines="1"
android:textColor="#9da2a9"
android:textSize="12sp"
android:textStyle="normal"
app:layout_constraintBottom_toBottomOf="@+id/text_channel_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/text_channel_name"
tools:text="230K members" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:paddingStart="@dimen/screen_edge_left_and_right_padding"
android:paddingTop="8dp"
android:paddingEnd="@dimen/screen_edge_left_and_right_padding"
android:paddingBottom="8dp">
<ImageView
android:id="@+id/image_avatar"
android:layout_width="40dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars[6]" />
<TextView
android:id="@+id/text_user_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="10dp"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:textColor="#0c0d0f"
android:textSize="17sp"
android:textStyle="normal"
app:layout_constraintEnd_toStartOf="@+id/text_server_url"
app:layout_constraintLeft_toRightOf="@+id/image_avatar"
app:layout_constraintStart_toEndOf="@+id/image_avatar"
app:layout_constraintTop_toTopOf="@+id/image_avatar"
tools:text="User" />
<TextView
android:id="@+id/text_user_username"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:fontFamily="sans-serif"
android:maxLines="1"
android:textColor="#9ea2a8"
android:textSize="15sp"
android:textStyle="normal"
app:layout_constraintEnd_toStartOf="@+id/text_server_url"
app:layout_constraintStart_toStartOf="@+id/text_user_name"
app:layout_constraintTop_toBottomOf="@+id/text_user_name"
tools:text="Username" />
<!-- We only show the server url if the user is searching for global users-->
<TextView
android:id="@+id/text_server_url"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:maxLines="1"
android:textColor="#9da2a9"
android:textSize="12sp"
android:textStyle="normal"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/text_user_username"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/text_user_name"
tools:text="230K members" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -184,6 +184,7 @@
<string name="msg_credentials_saved_successfully">Credentials saved successfully</string> <!-- TODO Translate -->
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">خاص</string>
......@@ -317,7 +318,8 @@
<string name="alert_title_default_skin_tone">نغمة الجلد الافتراضية</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -326,7 +328,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string> <!-- TODO Translate -->
<string name="header_channel">القنوات</string>
<string name="msg_channels">القنوات</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">المجموعات الخاصة</string>
<string name="header_direct_messages">الرسائل المباشرة</string>
<string name="header_live_chats">محادثات حية</string>
......
......@@ -175,6 +175,7 @@
<string name="msg_credentials_saved_successfully">Login-Daten erfolgreich gespeichert</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Privat</string>
......@@ -312,7 +313,8 @@
<string name="alert_title_default_skin_tone">Standard Hautton</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -321,7 +323,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favoriten</string>
<string name="header_channel">Räume</string>
<string name="msg_channels">Räume</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Private Räume</string>
<string name="header_direct_messages">Direkt Nachrichten</string>
<string name="header_live_chats">Live Chats</string>
......
......@@ -164,6 +164,7 @@
<string name="msg__your_2fa_code">What’s your 2FA code?</string> <!-- TODO Add translation -->
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Privado</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">Tono de piel predeterminado</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">Canales</string>
<string name="msg_channels">Canales</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Grupos privados</string>
<string name="header_direct_messages">Mensajes directos</string>
<string name="header_live_chats">Chats en vivo</string>
......
......@@ -179,6 +179,7 @@
<string name="msg_credentials_saved_successfully">اختیارها با موفقیت ذخیره شد</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">خصوصی</string>
......@@ -312,7 +313,8 @@
<string name="alert_title_default_skin_tone">مدل پوسته‌ی پیش‌فرض</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -321,7 +323,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">کانال‌ها</string>
<string name="msg_channels">کانال‌ها</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">گروه‌های خصوصی</string>
<string name="header_direct_messages">پیام‌های خصوصی</string>
<string name="header_live_chats">گفت‌وگوهای زنده</string>
......
......@@ -183,6 +183,7 @@
<string name="msg_credentials_saved_successfully">Certificats sauvegardés</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Privé</string>
......@@ -310,7 +311,8 @@
<string name="alert_title_default_skin_tone">Tonalité de peau par défaut</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -319,7 +321,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favoris</string>
<string name="header_channel">Salons</string>
<string name="msg_channels">Salons</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Groupes privés</string>
<string name="header_direct_messages">Messages directs</string>
<string name="header_live_chats">Chats en direct</string>
......
......@@ -198,6 +198,7 @@
<string name="msg_credentials_saved_successfully">प्रमाण पत्र सफलतापूर्वक सहेजे गए</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Preferences messages -->
<string name="msg_analytics_tracking">एनालिटिक्स ट्रैकिंग</string>
......@@ -313,7 +314,8 @@
<string name="alert_title_default_skin_tone">डिफ़ॉल्ट त्वचा टोन</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -322,8 +324,11 @@
<!--ChatRooms Headers-->
<string name="header_favorite">पसंदीदा</string>
<string name="header_channel">चैनलों</string>
<string name="msg_channels">चैनलों</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="header_private_groups">निजी समूहों</string>
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_direct_messages">प्रत्यक्ष संदेश</string>
<string name="header_live_chats">लाइव चैट</string>
<string name="header_unknown">अज्ञात</string>
......
......@@ -176,6 +176,7 @@
<string name="msg_credentials_saved_successfully">Credenziali salvate con successo</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Privato</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">Default skin tone</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">Canali</string>
<string name="msg_channels">Canali</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Gruppi Privati</string>
<string name="header_direct_messages">Messaggi Diretti</string>
<string name="header_live_chats">Stanza in diretta</string>
......
......@@ -179,6 +179,7 @@
<string name="msg_credentials_saved_successfully">資格情報を正常に保存しました</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">プライベート</string>
......@@ -312,7 +313,8 @@
<string name="alert_title_default_skin_tone">デフォルトスキントークン</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -321,7 +323,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">チャンネル</string>
<string name="msg_channels">チャンネル</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">プライベートグループ</string>
<string name="header_direct_messages">ダイレクトメッセージ</string>
<string name="header_live_chats">ライブチャット</string>
......
......@@ -182,8 +182,9 @@
<item quantity="other">%1$s reagiram com %2$s</item>
</plurals>
<string name="msg_credentials_saved_successfully">Credenciais salvas com sucesso</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_server">Servidor</string>
<string name="msg_add_new_server">Adicionar Novo Servidor</string>
<string name="msg_directory">Diretório</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Privado</string>
......@@ -311,7 +312,8 @@
<string name="alert_title_default_skin_tone">Tom de pele padrão</string>
<!-- Sort and group -->
<string name="msg_sort_by">Ordenar por %1$s</string>
<string name="msg_sort_by_placeholder">Ordenar por %1$s</string>
<string name="msg_sort_by">Ordernar por</string>
<string name="msg_sort_by_activity">Atividade</string>
<string name="msg_sort_by_name">Nome</string>
<string name="msg_group_by_unread_on_top">Não lidas no topo</string>
......@@ -320,7 +322,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favoritos</string>
<string name="header_channel">Canais</string>
<string name="msg_channels">Canais</string>
<string name="msg_users">Usuários</string>
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Grupos Privados</string>
<string name="header_direct_messages">Mensagens diretas</string>
<string name="header_live_chats">Live Chats</string>
......
......@@ -175,6 +175,7 @@
</plurals>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Privado</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">Tom de pele padrão</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favoritos</string>
<string name="header_channel">Canais</string>
<string name="msg_channels">Canais</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Grupos Privados</string>
<string name="header_direct_messages">Mensagens Directas</string>
<string name="header_live_chats">Chats ao Vivo</string>
......
......@@ -182,6 +182,7 @@
<string name="msg_credentials_saved_successfully">Учетные данные успешно сохранены</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Приватный</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">Тон кожи по умолчанию</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Избранные</string>
<string name="header_channel">Каналы</string>
<string name="msg_channels">Каналы</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Приватные каналы</string>
<string name="header_direct_messages">Личная переписка</string>
<string name="header_live_chats">Живые чаты</string>
......
......@@ -197,6 +197,7 @@
<string name="msg_credentials_saved_successfully">Kimlik bilgileri başarıyla kaydedildi</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Preferences messages -->
<string name="msg_analytics_tracking">İstatistik takibi</string>
......@@ -313,7 +314,8 @@
<string name="alert_title_default_skin_tone">Varsayılan tasarım tonu</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -322,7 +324,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">Kanallar</string>
<string name="msg_channels">Kanallar</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Gizli Gruplar</string>
<string name="header_direct_messages">Direkt Mesajlar</string>
<string name="header_live_chats">Canlı Sohbetler</string>
......
......@@ -181,6 +181,7 @@
<string name="msg_credentials_saved_successfully">Облікові дані було успішно збережено</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">Приватний</string>
......@@ -308,7 +309,8 @@
<string name="alert_title_default_skin_tone">Тон шкіри за замовчуванням</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -317,7 +319,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">Канали</string>
<string name="msg_channels">Канали</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">Приватні канали</string>
<string name="header_direct_messages">Особисті повідомлення</string>
<string name="header_live_chats">Живі чати</string>
......
......@@ -176,6 +176,7 @@
<string name="msg_credentials_saved_successfully">凭证成功保存</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">隐私</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">默认皮肤颜色</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">频道</string>
<string name="msg_channels">频道</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">私人组</string>
<string name="header_direct_messages">直接对话</string>
<string name="header_live_chats">Live 对话</string>
......
......@@ -176,6 +176,7 @@
<string name="msg_credentials_saved_successfully">憑證保存成功</string>
<string name="msg_server">Server</string> <!-- TODO Translate -->
<string name="msg_add_new_server">Add New Server</string> <!-- TODO Translate -->
<string name="msg_directory">Directory</string> <!-- TODO Translate -->
<!-- Create channel messages -->
<string name="msg_private_channel">隱私</string>
......@@ -309,7 +310,8 @@
<string name="alert_title_default_skin_tone">預設主題顏色</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by_placeholder">Sort by %1$s</string> <!-- TODO Translate -->
<string name="msg_sort_by">Sort by</string> <!-- TODO Translate -->
<string name="msg_sort_by_activity">Activity</string> <!-- TODO Translate -->
<string name="msg_sort_by_name">Name</string> <!-- TODO Translate -->
<string name="msg_group_by_unread_on_top">Unread on top</string> <!-- TODO Translate -->
......@@ -318,7 +320,10 @@
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string><!-- TODO - Add proper translation -->
<string name="header_channel">頻道</string>
<string name="msg_channels">頻道</string>
<string name="msg_users">Users</string> <!-- TODO Translate -->
<string name="msg_search_for_global_users">Search for global users</string> <!-- TODO Translate -->
<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="header_private_groups">私人群組</string>
<string name="header_direct_messages">直接對話</string>
<string name="header_live_chats">Live 對話</string>
......
......@@ -192,6 +192,7 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="msg_credentials_saved_successfully">Credentials saved successfully</string>
<string name="msg_server">Server</string>
<string name="msg_add_new_server">Add New Server</string>
<string name="msg_directory">Directory</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Private</string>
......@@ -325,7 +326,8 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<string name="alert_title_default_skin_tone">Default skin tone</string>
<!-- Sort and group -->
<string name="msg_sort_by">Sort by %1$s</string>
<string name="msg_sort_by_placeholder">Sort by %1$s</string>
<string name="msg_sort_by">Sort by</string>
<string name="msg_sort_by_activity">Activity</string>
<string name="msg_sort_by_name">Name</string>
<string name="msg_group_by_unread_on_top">Unread on top</string>
......@@ -334,7 +336,10 @@ https://github.com/RocketChat/java-code-styles/blob/master/CODING_STYLE.md#strin
<!--ChatRooms Headers-->
<string name="header_favorite">Favorites</string>
<string name="header_channel">Channels</string>
<string name="msg_channels">Channels</string>
<string name="msg_users">Users</string>
<string name="msg_search_for_global_users">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>
<string name="header_private_groups">Private Groups</string>
<string name="header_direct_messages">Direct Messages</string>
<string name="header_live_chats">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