mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-15 16:55:03 +01:00
Preserve focus after layout
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
060c72b244
commit
93b745ae6f
@ -93,6 +93,7 @@ import com.stfalcon.chatkit.utils.DateFormatter
|
||||
import com.uber.autodispose.lifecycle.LifecycleScopeProvider
|
||||
import com.vanniktech.emoji.EmojiPopup
|
||||
import kotlinx.android.synthetic.main.controller_chat.view.*
|
||||
import kotlinx.android.synthetic.main.conversations_list_view.view.*
|
||||
import kotlinx.android.synthetic.main.item_message_quote.view.*
|
||||
import kotlinx.android.synthetic.main.lobby_view.view.*
|
||||
import kotlinx.android.synthetic.main.view_message_input.view.*
|
||||
@ -188,6 +189,8 @@ class ChatView(private val bundle: Bundle) : BaseView(), ImageLoaderInterface {
|
||||
val layoutManager = LinearLayoutManager(activity, RecyclerView.VERTICAL, false)
|
||||
layoutManager.stackFromEnd = true
|
||||
view.messagesRecyclerView.initRecyclerView(layoutManager, messagesAdapter, true)
|
||||
view.messagesRecyclerView.preserveFocusAfterLayout = true
|
||||
|
||||
|
||||
emojiPopup = view.messageInput.let {
|
||||
EmojiPopup.Builder.fromRootView(view).setOnEmojiPopupShownListener {
|
||||
|
@ -101,6 +101,7 @@ class ConversationsListView : BaseView() {
|
||||
|
||||
view.apply {
|
||||
recyclerView.adapter = adapter
|
||||
recyclerView.preserveFocusAfterLayout = true
|
||||
with(swipeRefreshLayoutView) {
|
||||
setColorSchemeResources(R.color.colorPrimary)
|
||||
setOnRefreshListener {
|
||||
|
Loading…
Reference in New Issue
Block a user