Move Knoin routOff, routOn, routReload & setHash to rl.route.*

This commit is contained in:
djmaze 2020-09-16 20:35:29 +02:00
parent 03a40f3249
commit 467f615713
17 changed files with 83 additions and 111 deletions

View file

@ -40,7 +40,7 @@ import Remote from 'Remote/User/Fetch';
import { ComposeAttachmentModel } from 'Model/ComposeAttachment';
import { popup, command, isPopupVisible, showScreenPopup, hideScreenPopup, routeOn, routeOff } from 'Knoin/Knoin';
import { popup, command, isPopupVisible, showScreenPopup, hideScreenPopup } from 'Knoin/Knoin';
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
const Settings = rl.settings;
@ -636,7 +636,7 @@ class ComposePopupView extends AbstractViewNext {
this.to.focused(false);
routeOn();
rl.route.on();
this.resizeObserver.disconnect();
}
@ -719,7 +719,7 @@ class ComposePopupView extends AbstractViewNext {
* @param {string=} sCustomPlainText = null
*/
onShow(type, oMessageOrArray, aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText) {
routeOff();
rl.route.off();
const ro = this.resizeObserver;
ro.observe(ro.compose);

View file

@ -33,7 +33,7 @@ import { EmailModel } from 'Model/Email';
import { ContactModel } from 'Model/Contact';
import { ContactPropertyModel } from 'Model/ContactProperty';
import { popup, command, showScreenPopup, hideScreenPopup, routeOn, routeOff } from 'Knoin/Knoin';
import { popup, command, showScreenPopup, hideScreenPopup } from 'Knoin/Knoin';
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
const trim = text => null == text ? "" : (text + "").trim();
@ -633,12 +633,12 @@ class ContactsPopupView extends AbstractViewNext {
this.bBackToCompose = undefined === bBackToCompose ? false : !!bBackToCompose;
this.sLastComposeFocusedField = undefined === sLastComposeFocusedField ? '' : sLastComposeFocusedField;
routeOff();
rl.route.off();
this.reloadContactList(true);
}
onHide() {
routeOn();
rl.route.on();
this.currentContact(null);
this.emptySelection(true);