Fix grid when the number of videos is below the limit

When "videosCap" is set it was always applied, no matter the actual
number of videos. Due to this, even if there was just a single remote
video, as the available size was calculated based on the limit rather
than on the actual number of videos a mostly empty grid was shown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2021-11-02 16:54:17 +01:00
Родитель 244d956f7e
Коммит 9731a2345e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -650,7 +650,7 @@ export default {
// video components would occupy only the first 2 slots and be too small. // video components would occupy only the first 2 slots and be too small.
// To solve this, we shrink this 'max grid' we've just created to fit the // To solve this, we shrink this 'max grid' we've just created to fit the
// number of videos that we have. // number of videos that we have.
if (this.videosCap !== 0) { if (this.videosCap !== 0 && this.videosCount > this.videosCap) {
this.shrinkGrid(this.videosCap) this.shrinkGrid(this.videosCap)
} else { } else {
this.shrinkGrid(this.videosCount) this.shrinkGrid(this.videosCount)