File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
presentation/src/main/java/com/whyranoid/presentation/community Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ internal class CommunityItemFragment :
127127 binding.swipeRefreshLayout.apply {
128128 setOnRefreshListener {
129129 postAdapter.refresh()
130- binding.rvCommunity.scrollToPosition(0 )
130+ binding.rvCommunity.scrollToPosition(POSITION_TOP )
131131 binding.swipeRefreshLayout.isRefreshing = false
132132 }
133133
@@ -190,7 +190,7 @@ internal class CommunityItemFragment :
190190 binding.swipeRefreshLayout.apply {
191191 setOnRefreshListener {
192192 postAdapter.refresh()
193- binding.rvCommunity.scrollToPosition(0 )
193+ binding.rvCommunity.scrollToPosition(POSITION_TOP )
194194 binding.swipeRefreshLayout.isRefreshing = false
195195 }
196196
@@ -221,6 +221,7 @@ internal class CommunityItemFragment :
221221
222222 companion object {
223223 private const val COMMUNITY_CATEGORY_KEY = " communityCategoryKey"
224+ private const val POSITION_TOP = 0
224225
225226 fun newInstance (communityCategory : CommunityCategory ): CommunityItemFragment {
226227 val fragment = CommunityItemFragment ()
You can’t perform that action at this time.
0 commit comments