Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(lastN): Update only if neccessary.

Hristo Terezov4b29af6b5f9f
diff --git a/react/features/base/lastn/middleware.ts b/react/features/base/lastn/middleware.ts
index bb2b9ff321..bd80c67b26 100644
--- a/react/features/base/lastn/middleware.ts
+++ b/react/features/base/lastn/middleware.ts
@@ -88,7 +88,11 @@ const _updateLastN = debounce(({ dispatch, getState }: IStore) => {
lastNSelected = 1;
}
- dispatch(setLastN(lastNSelected));
+ const { lastN } = state['features/base/lastn'];
+
+ if (lastN !== lastNSelected) {
+ dispatch(setLastN(lastNSelected));
+ }
}, 1000); /* Don't send this more often than once a second. */