_.bind(function, object) to function.bind(object)

This commit is contained in:
djmaze 2020-07-20 15:47:33 +02:00
parent db2d95d684
commit af136f46c4
23 changed files with 38 additions and 45 deletions

View file

@ -338,7 +338,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
this.toggleFullScreen();
});
this.attachmentPreview = _.bind(this.attachmentPreview, this);
this.attachmentPreview = this.attachmentPreview.bind(this);
}
@command()
@ -529,7 +529,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
onBuild(dom) {
const self = this,
fCheckHeaderHeight = _.bind(this.checkHeaderHeight, this);
fCheckHeaderHeight = this.checkHeaderHeight.bind(this);
this.oDom = dom;
@ -685,7 +685,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
initShortcuts() {
// exit fullscreen, back
key('esc, backspace', KeyState.MessageView, _.bind(this.escShortcuts, this));
key('esc, backspace', KeyState.MessageView, this.escShortcuts.bind(this));
// fullscreen
key('enter', KeyState.MessageView, () => {