Skip to content

Commit

Permalink
Place set adapter to recycler in better place
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBourdin88 committed May 14, 2024
1 parent 39b244d commit f1106b4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ class SearchFragment : TwoPaneFragment() {
},
)

binding.mailRecyclerView.adapter = threadListAdapter.apply {
stateRestorationPolicy = StateRestorationPolicy.PREVENT_WHEN_EMPTY
}
threadListAdapter.stateRestorationPolicy = StateRestorationPolicy.PREVENT_WHEN_EMPTY
}

private fun setupListeners() = with(binding) {
Expand Down Expand Up @@ -265,6 +263,8 @@ class SearchFragment : TwoPaneFragment() {

private fun setMessagesUi() {
binding.mailRecyclerView.apply {
adapter = threadListAdapter

disableDragDirection(DirectionFlag.UP)
disableDragDirection(DirectionFlag.DOWN)
disableDragDirection(DirectionFlag.LEFT)
Expand Down

0 comments on commit f1106b4

Please sign in to comment.