Merge pull request #7354 from Tainan404/attempt-fix-tex-annotation
Fix text annotation
This commit is contained in:
commit
be5ccc2abd
@ -46,7 +46,7 @@ export default withTracker(() => {
|
||||
const subscriptionsHandlers = SUBSCRIPTIONS.map(name => Meteor.subscribe(name, credentials, subscriptionErrorHandler));
|
||||
|
||||
let groupChatMessageHandler = {};
|
||||
let annotationsHandler = {};
|
||||
// let annotationsHandler = {};
|
||||
|
||||
const chats = GroupChat.find({
|
||||
$or: [
|
||||
@ -71,22 +71,22 @@ export default withTracker(() => {
|
||||
Meteor.subscribe('meetings', credentials, mappedUser.isModerator, subscriptionErrorHandler);
|
||||
}
|
||||
|
||||
annotationsHandler = Meteor.subscribe('annotations', credentials, {
|
||||
const annotationsHandler = Meteor.subscribe('annotations', credentials, {
|
||||
onReady: () => {
|
||||
const activeTextShapeId = AnnotationsTextService.activeTextShapeId();
|
||||
AnnotationsLocal.remove({ id: { $ne: `${activeTextShapeId}-fake` } });
|
||||
Annotations.find({ id: { $ne: activeTextShapeId } }, { reactive: false }).forEach((a) => {
|
||||
try {
|
||||
AnnotationsLocal.insert(a);
|
||||
} catch (e) {
|
||||
// TODO
|
||||
}
|
||||
});
|
||||
annotationsHandler.stop();
|
||||
},
|
||||
...subscriptionErrorHandler,
|
||||
});
|
||||
|
||||
Annotations.find({ meetingId: Auth.meetingID }).observe({
|
||||
added(doc) {
|
||||
AnnotationsLocal.insert(doc);
|
||||
},
|
||||
});
|
||||
|
||||
subscriptionsHandlers.push(annotationsHandler);
|
||||
|
||||
const ready = subscriptionsHandlers.every(handler => handler.ready());
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user