mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-09 09:39:51 +00:00
Fix missing swipe to refresh on tab switch
This commit is contained in:
parent
dd0ad19fb9
commit
41176464db
1 changed files with 5 additions and 0 deletions
|
@ -282,6 +282,7 @@ class SubscriptionsFeedFragment : MainFragment() {
|
||||||
loadResults(true);
|
loadResults(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun loadCache() {
|
private fun loadCache() {
|
||||||
Logger.i(TAG, "Subscriptions load cache");
|
Logger.i(TAG, "Subscriptions load cache");
|
||||||
val cachePager = ChannelContentCache.instance.getSubscriptionCachePager();
|
val cachePager = ChannelContentCache.instance.getSubscriptionCachePager();
|
||||||
|
@ -301,6 +302,10 @@ class SubscriptionsFeedFragment : MainFragment() {
|
||||||
_taskGetPager.run(withRefetch);
|
_taskGetPager.run(withRefetch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onRestoreCachedData(cachedData: RecyclerData<InsertedViewAdapterWithLoader<ContentPreviewViewHolder>, LinearLayoutManager, IPager<IPlatformContent>, IPlatformContent, IPlatformContent, InsertedViewHolder<ContentPreviewViewHolder>>) {
|
||||||
|
super.onRestoreCachedData(cachedData);
|
||||||
|
setTextCentered(if (cachedData.results.isEmpty()) context.getString(R.string.no_results_found_swipe_down_to_refresh) else null);
|
||||||
|
}
|
||||||
private fun loadedResult(pager: IPager<IPlatformContent>) {
|
private fun loadedResult(pager: IPager<IPlatformContent>) {
|
||||||
Logger.i(TAG, "Subscriptions new pager loaded (${pager.getResults().size})");
|
Logger.i(TAG, "Subscriptions new pager loaded (${pager.getResults().size})");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue