mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
Some small fixes.
This commit is contained in:
parent
dc4ac6345c
commit
90ae426e24
2 changed files with 10 additions and 4 deletions
3
ui/src/components/comment-form.tsx
vendored
3
ui/src/components/comment-form.tsx
vendored
|
@ -144,6 +144,9 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
|
|||
// 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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
11
ui/src/utils.ts
vendored
11
ui/src/utils.ts
vendored
|
@ -588,6 +588,9 @@ export function messageToastify(
|
|||
|
||||
export function setupTribute(): Tribute {
|
||||
return new Tribute({
|
||||
noMatchTemplate: function () {
|
||||
return '';
|
||||
},
|
||||
collection: [
|
||||
// Emojis
|
||||
{
|
||||
|
@ -669,7 +672,7 @@ function userSearch(text: string, cb: any) {
|
|||
|
||||
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) {
|
||||
|
@ -683,7 +686,7 @@ function userSearch(text: string, cb: any) {
|
|||
};
|
||||
});
|
||||
cb(users);
|
||||
this.userSub.unsubscribe();
|
||||
userSub.unsubscribe();
|
||||
}
|
||||
},
|
||||
err => console.error(err),
|
||||
|
@ -706,7 +709,7 @@ function communitySearch(text: string, cb: any) {
|
|||
|
||||
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) {
|
||||
|
@ -720,7 +723,7 @@ function communitySearch(text: string, cb: any) {
|
|||
};
|
||||
});
|
||||
cb(communities);
|
||||
this.communitySub.unsubscribe();
|
||||
communitySub.unsubscribe();
|
||||
}
|
||||
},
|
||||
err => console.error(err),
|
||||
|
|
Loading…
Reference in a new issue