mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-11 06:23:06 +03:00
Use "once" method instead of "on"/"off" in JS message form
This commit is contained in:
parent
bffc2fd799
commit
b4ab5d8cd1
@ -91,12 +91,12 @@
|
|||||||
if (msg != '') {
|
if (msg != '') {
|
||||||
this.disableInput();
|
this.disableInput();
|
||||||
this.model.postMessage(msg);
|
this.model.postMessage(msg);
|
||||||
|
Mibew.Objects.Collections.messages.once(
|
||||||
|
'multiple:add',
|
||||||
|
this.postMessageComplete,
|
||||||
|
this
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Mibew.Objects.Collections.messages.on(
|
|
||||||
'multiple:add',
|
|
||||||
this.postMessageComplete,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -149,11 +149,6 @@
|
|||||||
this.enableInput();
|
this.enableInput();
|
||||||
// Always set focus on message input after message sent
|
// Always set focus on message input after message sent
|
||||||
this.ui.message.focus();
|
this.ui.message.focus();
|
||||||
Mibew.Objects.Collections.messages.off(
|
|
||||||
'multiple:add',
|
|
||||||
this.postMessageComplete,
|
|
||||||
this
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user