_.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

@ -41,7 +41,7 @@ class AbstractSystemDropDownUserView extends AbstractViewNext {
this.accountMenuDropdownTrigger = ko.observable(false);
this.capaAdditionalAccounts = ko.observable(Settings.capa(Capa.AdditionalAccounts));
this.addAccountClick = _.bind(this.addAccountClick, this);
this.addAccountClick = this.addAccountClick.bind(this);
Events.sub('audio.stop', () => AppStore.currentAudio(''));
Events.sub('audio.start', (name) => AppStore.currentAudio(name));

View file

@ -222,7 +222,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
this.canBeMoved = this.hasCheckedOrSelectedLines;
this.quotaTooltip = _.bind(this.quotaTooltip, this);
this.quotaTooltip = this.quotaTooltip.bind(this);
this.selector = new Selector(
this.messageList,

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, () => {