Bugfix: subscribables should be created after computables

This commit is contained in:
djmaze 2020-10-26 14:44:34 +01:00
parent f25d210f3e
commit 8d7e25fc7c
3 changed files with 102 additions and 102 deletions

View file

@ -94,8 +94,6 @@ class ContactsPopupView extends AbstractViewNext {
this.useCheckboxesInList = SettingsStore.useCheckboxesInList;
this.search.subscribe(() => this.reloadContactList());
this.selector = new Selector(
this.contacts,
this.currentContact,
@ -119,12 +117,6 @@ class ContactsPopupView extends AbstractViewNext {
// this.saveCommandDebounce = _.debounce(this.saveCommand.bind(this), 1000);
this.viewHash.subscribe(() => {
if (this.watchHash() && !this.viewReadOnly() && !this.watchDirty()) {
this.watchDirty(true);
}
});
this.sDefaultKeyScope = KeyState.ContactList;
this.addComputables({
@ -181,6 +173,14 @@ class ContactsPopupView extends AbstractViewNext {
viewHash: () => '' + this.viewProperties().map(oItem => oItem.value()).join('')
});
this.search.subscribe(() => this.reloadContactList());
this.viewHash.subscribe(() => {
if (this.watchHash() && !this.viewReadOnly() && !this.watchDirty()) {
this.watchDirty(true);
}
});
}
@command()