Parcourir la source

fix channel view pagination issues (#1127)

fixes: #1126
Diego Cardenas il y a 3 ans
Parent
commit
617f77db95
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/views/viewer/ChannelView/ChannelView.tsx

+ 1 - 1
src/views/viewer/ChannelView/ChannelView.tsx

@@ -178,7 +178,7 @@ export const ChannelView: React.FC = () => {
       setCurrentSearchPage(page)
     } else {
       setCurrentPage(page)
-      if (!!edges && page * videosPerPage + videosPerPage > edges?.length) {
+      if (!!edges && page * videosPerPage + videosPerPage > edges?.length && edges?.length < (totalCount ?? 0)) {
         fetchMore({
           variables: {
             ...variables,