made list refresh working
This commit is contained in:
parent
3180a9c516
commit
399494ec5b
|
@ -28,6 +28,7 @@ import android.support.v7.widget.RecyclerView
|
|||
import android.view.KeyEvent
|
||||
import com.bumptech.glide.Glide
|
||||
import kotlinx.android.synthetic.main.fragment_content_recyclerview.*
|
||||
import org.mariotaku.ktextension.set
|
||||
import org.mariotaku.twidere.adapter.ParcelableUserListsAdapter
|
||||
import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter
|
||||
import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter.IndicatorPosition
|
||||
|
@ -160,5 +161,15 @@ abstract class ParcelableUserListsFragment : AbsContentListRecyclerViewFragment<
|
|||
return true
|
||||
}
|
||||
|
||||
override fun triggerRefresh(): Boolean {
|
||||
adapter.setData(null)
|
||||
val loaderArgs = Bundle(arguments).apply {
|
||||
this[EXTRA_FROM_USER] = true
|
||||
}
|
||||
loaderManager.restartLoader(0, loaderArgs, this)
|
||||
showProgress()
|
||||
return true
|
||||
}
|
||||
|
||||
protected abstract fun onCreateUserListsLoader(context: Context, args: Bundle, fromUser: Boolean): Loader<List<ParcelableUserList>>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue