aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-08 17:31:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-08 17:31:21 +0100
commitf595d3947708114deeed4312cc5ffd285745b090 (patch)
treee2fef8fae4e9d9ee6039ea2ab53eb20d11002969 /client/src/app/shared
parente600e1fea275c12f4420e23624804617e61a082c (diff)
downloadPeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.gz
PeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.zst
PeerTube-f595d3947708114deeed4312cc5ffd285745b090.zip
Finish admin design
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index ee1ed2cb2..ba1635a18 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -62,7 +62,7 @@ export abstract class AbstractVideoList implements OnInit {
62 observable.subscribe( 62 observable.subscribe(
63 ({ videos, totalVideos }) => { 63 ({ videos, totalVideos }) => {
64 // Paging is too high, return to the first one 64 // Paging is too high, return to the first one
65 if (totalVideos <= ((this.pagination.currentPage - 1) * this.pagination.itemsPerPage)) { 65 if (this.pagination.currentPage > 1 && totalVideos <= ((this.pagination.currentPage - 1) * this.pagination.itemsPerPage)) {
66 this.pagination.currentPage = 1 66 this.pagination.currentPage = 1
67 this.setNewRouteParams() 67 this.setNewRouteParams()
68 return this.reloadVideos() 68 return this.reloadVideos()
@@ -82,6 +82,10 @@ export abstract class AbstractVideoList implements OnInit {
82 } 82 }
83 83
84 protected hasMoreVideos () { 84 protected hasMoreVideos () {
85 // No results
86 if (this.pagination.totalItems === 0) return false
87
88 // Not loaded yet
85 if (!this.pagination.totalItems) return true 89 if (!this.pagination.totalItems) return true
86 90
87 const maxPage = this.pagination.totalItems / this.pagination.itemsPerPage 91 const maxPage = this.pagination.totalItems / this.pagination.itemsPerPage