Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lastN) fix last N getting stuck on 1 #11425

Merged
merged 1 commit into from Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions react/features/base/lastn/middleware.js
Expand Up @@ -49,15 +49,14 @@ const _updateLastN = debounce(({ dispatch, getState }) => {
const { appState } = state['features/background'] || {};
const { enabled: filmStripEnabled } = state['features/filmstrip'];
const config = state['features/base/config'];
const { lastNLimits, lastN } = state['features/base/lastn'];
const { lastNLimits } = state['features/base/lastn'];
const participantCount = getParticipantCount(state);

// Select the lastN value based on the following preference order.
// 1. The last-n value in redux.
// 2. The last-n value from 'startLastN' if it is specified in config.js
// 3. The last-n value from 'channelLastN' if specified in config.js.
// 4. -1 as the default value.
let lastNSelected = lastN || (config.startLastN ?? (config.channelLastN ?? -1));
// Select the (initial) lastN value based on the following preference order.
// 1. The last-n value from 'startLastN' if it is specified in config.js
// 2. The last-n value from 'channelLastN' if specified in config.js.
// 3. -1 as the default value.
let lastNSelected = config.startLastN ?? (config.channelLastN ?? -1);

// Apply last N limit based on the # of participants and config settings.
const limitedLastN = limitLastN(participantCount, lastNLimits);
Expand Down