Underscore.js _.delay() to native setTimeout()

This commit is contained in:
djmaze 2020-07-22 20:28:25 +02:00
parent a82575a830
commit 43c92a82e6
29 changed files with 67 additions and 82 deletions

View file

@ -508,7 +508,7 @@ class ComposePopupView extends AbstractViewNext {
contactsCommand() {
if (this.allowContacts) {
this.skipCommand();
_.delay(() => {
setTimeout(() => {
showScreenPopup(require('View/Popup/Contacts'), [true, this.sLastFocusedField]);
}, Magics.Time200ms);
}
@ -706,7 +706,7 @@ class ComposePopupView extends AbstractViewNext {
editor(fOnInit) {
if (fOnInit) {
if (!this.oEditor && this.composeEditorArea()) {
// _.delay(() => {
// setTimeout(() => {
this.oEditor = new HtmlEditor(
this.composeEditorArea(),
null,
@ -1169,7 +1169,7 @@ class ComposePopupView extends AbstractViewNext {
setFocusInPopup() {
if (!bMobileDevice) {
_.delay(() => {
setTimeout(() => {
if ('' === this.to()) {
this.to.focused(true);
} else if (this.oEditor) {