// This only finishes this form, if the randomly generated form_id matches the one received
if (this.state.commentForm.form_id == data.form_id) {
this.setState({ finished: true });
+
+ // Necessary because it broke tribute for some reaso
+ this.setState({ finished: false });
}
}
}
export function setupTribute(): Tribute {
return new Tribute({
+ noMatchTemplate: function () {
+ return '';
+ },
collection: [
// Emojis
{
WebSocketService.Instance.search(form);
- this.userSub = WebSocketService.Instance.subject.subscribe(
+ let userSub = WebSocketService.Instance.subject.subscribe(
msg => {
let res = wsJsonToRes(msg);
if (res.op == UserOperation.Search) {
};
});
cb(users);
- this.userSub.unsubscribe();
+ userSub.unsubscribe();
}
},
err => console.error(err),
WebSocketService.Instance.search(form);
- this.communitySub = WebSocketService.Instance.subject.subscribe(
+ let communitySub = WebSocketService.Instance.subject.subscribe(
msg => {
let res = wsJsonToRes(msg);
if (res.op == UserOperation.Search) {
};
});
cb(communities);
- this.communitySub.unsubscribe();
+ communitySub.unsubscribe();
}
},
err => console.error(err),