mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +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 != '') {
|
||||
this.disableInput();
|
||||
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();
|
||||
// Always set focus on message input after message sent
|
||||
this.ui.message.focus();
|
||||
Mibew.Objects.Collections.messages.off(
|
||||
'multiple:add',
|
||||
this.postMessageComplete,
|
||||
this
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user