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 :
127
127
binding.swipeRefreshLayout.apply {
128
128
setOnRefreshListener {
129
129
postAdapter.refresh()
130
- binding.rvCommunity.scrollToPosition(0 )
130
+ binding.rvCommunity.scrollToPosition(POSITION_TOP )
131
131
binding.swipeRefreshLayout.isRefreshing = false
132
132
}
133
133
@@ -190,7 +190,7 @@ internal class CommunityItemFragment :
190
190
binding.swipeRefreshLayout.apply {
191
191
setOnRefreshListener {
192
192
postAdapter.refresh()
193
- binding.rvCommunity.scrollToPosition(0 )
193
+ binding.rvCommunity.scrollToPosition(POSITION_TOP )
194
194
binding.swipeRefreshLayout.isRefreshing = false
195
195
}
196
196
@@ -221,6 +221,7 @@ internal class CommunityItemFragment :
221
221
222
222
companion object {
223
223
private const val COMMUNITY_CATEGORY_KEY = " communityCategoryKey"
224
+ private const val POSITION_TOP = 0
224
225
225
226
fun newInstance (communityCategory : CommunityCategory ): CommunityItemFragment {
226
227
val fragment = CommunityItemFragment ()
You can’t perform that action at this time.
0 commit comments