|
|
@ -588,6 +588,9 @@ export function messageToastify(
|
|
|
|
|
|
|
|
|
|
|
|
export function setupTribute(): Tribute {
|
|
|
|
export function setupTribute(): Tribute {
|
|
|
|
return new Tribute({
|
|
|
|
return new Tribute({
|
|
|
|
|
|
|
|
noMatchTemplate: function () {
|
|
|
|
|
|
|
|
return '';
|
|
|
|
|
|
|
|
},
|
|
|
|
collection: [
|
|
|
|
collection: [
|
|
|
|
// Emojis
|
|
|
|
// Emojis
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -669,7 +672,7 @@ function userSearch(text: string, cb: any) {
|
|
|
|
|
|
|
|
|
|
|
|
WebSocketService.Instance.search(form);
|
|
|
|
WebSocketService.Instance.search(form);
|
|
|
|
|
|
|
|
|
|
|
|
this.userSub = WebSocketService.Instance.subject.subscribe(
|
|
|
|
let userSub = WebSocketService.Instance.subject.subscribe(
|
|
|
|
msg => {
|
|
|
|
msg => {
|
|
|
|
let res = wsJsonToRes(msg);
|
|
|
|
let res = wsJsonToRes(msg);
|
|
|
|
if (res.op == UserOperation.Search) {
|
|
|
|
if (res.op == UserOperation.Search) {
|
|
|
@ -683,7 +686,7 @@ function userSearch(text: string, cb: any) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
cb(users);
|
|
|
|
cb(users);
|
|
|
|
this.userSub.unsubscribe();
|
|
|
|
userSub.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
err => console.error(err),
|
|
|
|
err => console.error(err),
|
|
|
@ -706,7 +709,7 @@ function communitySearch(text: string, cb: any) {
|
|
|
|
|
|
|
|
|
|
|
|
WebSocketService.Instance.search(form);
|
|
|
|
WebSocketService.Instance.search(form);
|
|
|
|
|
|
|
|
|
|
|
|
this.communitySub = WebSocketService.Instance.subject.subscribe(
|
|
|
|
let communitySub = WebSocketService.Instance.subject.subscribe(
|
|
|
|
msg => {
|
|
|
|
msg => {
|
|
|
|
let res = wsJsonToRes(msg);
|
|
|
|
let res = wsJsonToRes(msg);
|
|
|
|
if (res.op == UserOperation.Search) {
|
|
|
|
if (res.op == UserOperation.Search) {
|
|
|
@ -720,7 +723,7 @@ function communitySearch(text: string, cb: any) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
cb(communities);
|
|
|
|
cb(communities);
|
|
|
|
this.communitySub.unsubscribe();
|
|
|
|
communitySub.unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
err => console.error(err),
|
|
|
|
err => console.error(err),
|
|
|
|