Fix channel content not showing older non-videos, fix seperated channel contents not being fetched if not both streams and videos are included

This commit is contained in:
Kelvin 2024-04-19 22:40:13 +02:00
parent 8be7b1272b
commit 959c192762
5 changed files with 11 additions and 8 deletions

View file

@ -105,9 +105,9 @@ class ChannelContentsFragment : Fragment(), IChannelTabFragment {
}).success {
setLoading(false);
val posBefore = _results.size;
val toAdd = it.filter { it is IPlatformVideo }.map { it as IPlatformVideo }
_results.addAll(toAdd);
_adapterResults?.let { adapterVideo -> adapterVideo.notifyItemRangeInserted(adapterVideo.childToParentPosition(posBefore), toAdd.size); };
//val toAdd = it.filter { it is IPlatformVideo }.map { it as IPlatformVideo }
_results.addAll(it);
_adapterResults?.let { adapterVideo -> adapterVideo.notifyItemRangeInserted(adapterVideo.childToParentPosition(posBefore), it.size); };
}.exception<Throwable> {
Logger.w(TAG, "Failed to load next page.", it);
UIDialogs.showGeneralRetryErrorDialog(requireContext(), it.message ?: "", it, { loadNextPage() });

View file

@ -676,8 +676,11 @@ class StatePlatform {
val pagerResult: IPager<IPlatformContent>;
if(!clientCapabilities.hasType(ResultCapabilities.TYPE_MIXED) &&
clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS) &&
clientCapabilities.hasType(ResultCapabilities.TYPE_STREAMS)) {
( clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS) ||
clientCapabilities.hasType(ResultCapabilities.TYPE_STREAMS) ||
clientCapabilities.hasType(ResultCapabilities.TYPE_LIVE) ||
clientCapabilities.hasType(ResultCapabilities.TYPE_POSTS)
)) {
val toQuery = mutableListOf<String>();
if(clientCapabilities.hasType(ResultCapabilities.TYPE_VIDEOS))
toQuery.add(ResultCapabilities.TYPE_VIDEOS);

@ -1 +1 @@
Subproject commit bc13b38411bdb8ad7c48d869ec9bc2068e671bd0
Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f

@ -1 +1 @@
Subproject commit bef199baa9df5cb3192c7a3f8baf8c57e9fbdaea
Subproject commit cac27408440f5586c1c68d846456792041403d35

@ -1 +1 @@
Subproject commit 940bb554d5fca5d8c3e2c6f501a74b7f03c9011b
Subproject commit cac27408440f5586c1c68d846456792041403d35