"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bigbluebutton-html5/imports/ui/components/components-data/users-context/adapter.jsx" between
bigbluebutton-2.5.0.tar.gz and bigbluebutton-2.5.1.tar.gz

About: BigBlueButton is a complete web conferencing system (mainly designed for online learning).

adapter.jsx  (bigbluebutton-2.5.0):adapter.jsx  (bigbluebutton-2.5.1)
import { useContext, useEffect } from 'react'; import { useContext, useEffect } from 'react';
import Users, { CurrentUser } from '/imports/api/users'; import { CurrentUser } from '/imports/api/users';
import Users from '/imports/api/users';
import UsersPersistentData from '/imports/api/users-persistent-data'; import UsersPersistentData from '/imports/api/users-persistent-data';
import { UsersContext, ACTIONS } from './context'; import { UsersContext, ACTIONS } from './context';
import ChatLogger from '/imports/ui/components/chat/chat-logger/ChatLogger'; import ChatLogger from '/imports/ui/components/chat/chat-logger/ChatLogger';
const Adapter = () => { const Adapter = () => {
const usingUsersContext = useContext(UsersContext); const usingUsersContext = useContext(UsersContext);
const { dispatch } = usingUsersContext; const { dispatch } = usingUsersContext;
useEffect(() => { useEffect(() => {
const usersPersistentDataCursor = UsersPersistentData.find({}, { sort: { tim estamp: 1 } }); const usersPersistentDataCursor = UsersPersistentData.find({}, { sort: { tim estamp: 1 } });
skipping to change at line 32 skipping to change at line 33
}, },
changed: (obj) => { changed: (obj) => {
ChatLogger.debug('usersAdapter::observe::changed_persistent_user', obj); ChatLogger.debug('usersAdapter::observe::changed_persistent_user', obj);
dispatch({ dispatch({
type: ACTIONS.CHANGED_USER_PERSISTENT_DATA, type: ACTIONS.CHANGED_USER_PERSISTENT_DATA,
value: { value: {
user: obj, user: obj,
}, },
}); });
}, },
removed: (obj) => { removed: () => {},
ChatLogger.debug('usersAdapter::observe::removed', obj);
dispatch({
type: ACTIONS.REMOVED,
value: {
user: obj,
},
});
},
}); });
}, []); }, []);
useEffect(() => { useEffect(() => {
const usersCursor = Users.find({}, { sort: { timestamp: 1 } }); const usersCursor = Users.find({}, { sort: { timestamp: 1 } });
const CurrentUserCursor = CurrentUser.find({}); const CurrentUserCursor = CurrentUser.find({});
usersCursor.observe({ usersCursor.observe({
added: (obj) => { added: (obj) => {
ChatLogger.debug('usersAdapter::observe::added', obj); ChatLogger.debug('usersAdapter::observe::added', obj);
dispatch({ dispatch({
 End of changes. 2 change blocks. 
10 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)