mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Cleanup AppUserStore
Simplify KeyState/Focused as Scope enum
This commit is contained in:
parent
62cb918180
commit
eff92c3152
27 changed files with 177 additions and 232 deletions
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import {
|
||||
SaveSettingsStep,
|
||||
Notification,
|
||||
KeyState
|
||||
Scope
|
||||
} from 'Common/Enums';
|
||||
|
||||
import { ComposeType } from 'Common/EnumsUser';
|
||||
|
|
@ -94,8 +94,6 @@ class ContactsPopupView extends AbstractViewPopup {
|
|||
|
||||
// this.saveCommandDebounce = _.debounce(this.saveCommand.bind(this), 1000);
|
||||
|
||||
this.sDefaultKeyScope = KeyState.ContactList;
|
||||
|
||||
const
|
||||
// propertyFocused = property => !property.isValid() && !property.focused(),
|
||||
pagecount = () => Math.max(1, Math.ceil(this.contactsCount() / CONTACTS_PER_PAGE));
|
||||
|
|
@ -490,14 +488,14 @@ class ContactsPopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
onBuild(dom) {
|
||||
this.selector.init(dom.querySelector('.b-list-content'), KeyState.ContactList);
|
||||
this.selector.init(dom.querySelector('.b-list-content'), Scope.Contacts);
|
||||
|
||||
shortcuts.add('delete', '', KeyState.ContactList, () => {
|
||||
shortcuts.add('delete', '', Scope.Contacts, () => {
|
||||
this.deleteCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
shortcuts.add('c,w', '', KeyState.ContactList, () => {
|
||||
shortcuts.add('c,w', '', Scope.Contacts, () => {
|
||||
this.newMessageCommand();
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue