2020-08-31 17:31:05 +00:00
|
|
|
import React, { useState } from 'react'
|
|
|
|
import { resetUsers } from '../store/actions/actions.js'
|
2020-09-01 08:42:25 +00:00
|
|
|
import Notifications from '../../utils/notifications.js'
|
2020-08-31 17:31:05 +00:00
|
|
|
|
|
|
|
const Collaboration = () => {
|
|
|
|
const onChangeEditUsers = (users) => {
|
|
|
|
const store = Common.Store.get();
|
|
|
|
store.dispatch(resetUsers(Object.values(users)));
|
|
|
|
};
|
|
|
|
|
2020-09-01 08:42:25 +00:00
|
|
|
Common.Notifications.on('engineCreated', api => {
|
|
|
|
// this.api = api;
|
|
|
|
api.asc_registerCallback('asc_onAuthParticipantsChanged', onChangeEditUsers);
|
|
|
|
api.asc_registerCallback('asc_onParticipantsChanged', onChangeEditUsers);
|
|
|
|
// this.api.asc_registerCallback('asc_onAddComment', _.bind(this.onApiAddComment, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onAddComments', _.bind(this.onApiAddComments, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onChangeCommentData', _.bind(this.onApiChangeCommentData, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onRemoveComment', _.bind(this.onApiRemoveComment, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onRemoveComments', _.bind(this.onApiRemoveComments, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onShowComment', _.bind(this.apiShowComments, this));
|
|
|
|
// this.api.asc_registerCallback('asc_onHideComment', _.bind(this.apiHideComments, this));
|
|
|
|
});
|
|
|
|
|
2020-08-31 17:31:05 +00:00
|
|
|
return {
|
|
|
|
setApi(api) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export {Collaboration as CollaborationController}
|