This commit is contained in:
Mariotaku Lee 2017-05-21 11:03:13 +08:00
parent 87d953942e
commit c3d95a4cad
No known key found for this signature in database
GPG Key ID: 99505AEA531814F1
1 changed files with 7 additions and 7 deletions

View File

@ -435,15 +435,15 @@ class StatusFragment : BaseFragment(), LoaderCallbacks<SingleResponse<Parcelable
override fun onLoadMoreContents(@IndicatorPosition position: Long) { override fun onLoadMoreContents(@IndicatorPosition position: Long) {
if (!hasMoreConversation) return if (!hasMoreConversation) return
if (position and ILoadMoreSupportAdapter.START != 0L) { if (ILoadMoreSupportAdapter.START in position) {
val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION) val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION)
val status = adapter.getStatus(start) val first = adapter.getStatus(start, true)
if (status.in_reply_to_status_id == null) return if (first.in_reply_to_status_id == null) return
loadConversation(status, null, status.id) loadConversation(status, null, first.id)
} else if (position and ILoadMoreSupportAdapter.END != 0L) { } else if (ILoadMoreSupportAdapter.END in position) {
val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION) val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION)
val status = adapter.getStatus(start + adapter.getStatusCount(true) - 1) val last = adapter.getStatus(start + adapter.getStatusCount(true) - 1, true)
loadConversation(status, status.id, null) loadConversation(status, last.id, null)
} }
adapter.loadMoreIndicatorPosition = position adapter.loadMoreIndicatorPosition = position
} }