web-apps/apps/common/mobile/lib/controller/Collaboration.jsx
2020-09-29 21:59:57 +03:00

35 lines
1.5 KiB
JavaScript

import React, { Component } from 'react'
import Notifications from '../../utils/notifications.js'
import {observer, inject} from "mobx-react"
@inject('users')
class CollaborationController extends Component {
constructor(props){
super(props)
Common.Notifications.on('engineCreated', api => {
// this.api = api;
api.asc_registerCallback('asc_onAuthParticipantsChanged', this.onChangeEditUsers.bind(this));
api.asc_registerCallback('asc_onParticipantsChanged', this.onChangeEditUsers.bind(this));
// 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));
});
}
onChangeEditUsers(users) {
const storeUsers = this.props.users;
storeUsers.reset(users);
};
render() {
return null
}
};
export default CollaborationController;