fix loop on grid mode when pagination is active
This commit is contained in:
parent
156cdb7a3f
commit
e52aa27422
@ -530,30 +530,11 @@ class VideoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getGridUsers(users, streams) {
|
getGridUsers(users, streams) {
|
||||||
const pageSize = this.getMyPageSize();
|
|
||||||
const isPaginationDisabled = !this.isPaginationEnabled() || pageSize === 0;
|
|
||||||
|
|
||||||
const isGridEnabled = this.isGridEnabled();
|
const isGridEnabled = this.isGridEnabled();
|
||||||
let gridUsers = [];
|
let gridUsers = [];
|
||||||
|
|
||||||
if (isPaginationDisabled) {
|
|
||||||
if (isGridEnabled) {
|
|
||||||
const streamUsers = streams.map((stream) => stream.userId);
|
|
||||||
|
|
||||||
gridUsers = users.filter(
|
|
||||||
(user) => !user.loggedOut && !user.left && !streamUsers.includes(user.userId),
|
|
||||||
).map((user) => ({
|
|
||||||
isGridItem: true,
|
|
||||||
...user,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
return gridUsers;
|
|
||||||
}
|
|
||||||
const paginatedStreams = this.getVideoPage(streams, pageSize);
|
|
||||||
|
|
||||||
if (isGridEnabled) {
|
if (isGridEnabled) {
|
||||||
const streamUsers = paginatedStreams.map((stream) => stream.userId);
|
const streamUsers = streams.map((stream) => stream.userId);
|
||||||
|
|
||||||
gridUsers = users.filter(
|
gridUsers = users.filter(
|
||||||
(user) => !user.loggedOut && !user.left && !streamUsers.includes(user.userId),
|
(user) => !user.loggedOut && !user.left && !streamUsers.includes(user.userId),
|
||||||
|
Loading…
Reference in New Issue
Block a user