fixed #845
This commit is contained in:
parent
87d953942e
commit
c3d95a4cad
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue