commit
313f1edc71
|
@ -225,7 +225,7 @@ class Detail extends Component {
|
||||||
if(num){
|
if(num){
|
||||||
this.setState({
|
this.setState({
|
||||||
secondSync:true,
|
secondSync:true,
|
||||||
firsrtSync:false
|
firstSync:false
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -236,7 +236,7 @@ class Detail extends Component {
|
||||||
}else{
|
}else{
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
this.setState({
|
this.setState({
|
||||||
firsrtSync:false,
|
firstSync:false,
|
||||||
secondSync:false
|
secondSync:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ class Detail extends Component {
|
||||||
var cable = actioncable.createConsumer(`wss://${name}/cable`);
|
var cable = actioncable.createConsumer(`wss://${name}/cable`);
|
||||||
this.canvasChannel1 = cable.subscriptions.create({
|
this.canvasChannel1 = cable.subscriptions.create({
|
||||||
channel: `MirrorProjectChannel`,
|
channel: `MirrorProjectChannel`,
|
||||||
id: project && project.identifier
|
id: project && project.id
|
||||||
}, {
|
}, {
|
||||||
connected: () => {
|
connected: () => {
|
||||||
console.log("###### channel connected! ######");
|
console.log("###### channel connected! ######");
|
||||||
|
@ -267,6 +267,10 @@ class Detail extends Component {
|
||||||
console.log(`###### ---received data--- ######`);
|
console.log(`###### ---received data--- ######`);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.getDetail();
|
this.getDetail();
|
||||||
|
this.setState({
|
||||||
|
firstSync:false,
|
||||||
|
secondSync:false
|
||||||
|
});
|
||||||
cable.subscriptions.consumer.disconnect();
|
cable.subscriptions.consumer.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue