mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Code refactoring
This commit is contained in:
parent
bf56821c2d
commit
31860420cb
32 changed files with 1342 additions and 1282 deletions
|
|
@ -27,10 +27,10 @@
|
|||
AccountStore = require('Stores/User/Account'),
|
||||
FolderStore = require('Stores/User/Folder'),
|
||||
PgpStore = require('Stores/User/Pgp'),
|
||||
MessageStore = require('Stores/User/Message'),
|
||||
SocialStore = require('Stores/Social'),
|
||||
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/User/Data'),
|
||||
Cache = require('Storage/User/Cache'),
|
||||
Remote = require('Storage/User/Remote'),
|
||||
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
this.allowContacts = !!AppStore.contactsIsAllowed();
|
||||
|
||||
this.bSkipNextHide = false;
|
||||
this.composeInEdit = Data.composeInEdit;
|
||||
this.composeInEdit = AppStore.composeInEdit;
|
||||
this.editorDefaultType = SettingsStore.editorDefaultType;
|
||||
|
||||
this.capaOpenPGP = PgpStore.capaOpenPGP;
|
||||
|
|
@ -433,8 +433,6 @@
|
|||
|
||||
var self = this;
|
||||
|
||||
window.console.log(this.sLastFocusedField);
|
||||
|
||||
_.delay(function () {
|
||||
kn.showScreenPopup(require('View/Popup/Contacts'),
|
||||
[true, self.sLastFocusedField]);
|
||||
|
|
@ -578,7 +576,7 @@
|
|||
if ('' !== sDraftFolder)
|
||||
{
|
||||
Cache.setFolderHash(sDraftFolder, '');
|
||||
if (Data.currentFolderFullNameRaw() === sDraftFolder)
|
||||
if (FolderStore.currentFolderFullNameRaw() === sDraftFolder)
|
||||
{
|
||||
require('App/User').reloadMessageList(true);
|
||||
}
|
||||
|
|
@ -701,10 +699,10 @@
|
|||
|
||||
if (this.bFromDraft)
|
||||
{
|
||||
oMessage = Data.message();
|
||||
oMessage = MessageStore.message();
|
||||
if (oMessage && this.draftFolder() === oMessage.folderFullNameRaw && this.draftUid() === oMessage.uid)
|
||||
{
|
||||
Data.message(null);
|
||||
MessageStore.message(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -741,7 +739,7 @@
|
|||
|
||||
if (!this.bSkipNextHide)
|
||||
{
|
||||
this.composeInEdit(false);
|
||||
AppStore.composeInEdit(false);
|
||||
this.reset();
|
||||
}
|
||||
|
||||
|
|
@ -883,7 +881,7 @@
|
|||
|
||||
this.autosaveStart();
|
||||
|
||||
if (this.composeInEdit())
|
||||
if (AppStore.composeInEdit())
|
||||
{
|
||||
sType = sType || Enums.ComposeType.Empty;
|
||||
|
||||
|
|
@ -969,7 +967,7 @@
|
|||
ComposePopupView.prototype.initOnShow = function (sType, oMessageOrArray,
|
||||
aToEmails, aCcEmails, aBccEmails, sCustomSubject, sCustomPlainText)
|
||||
{
|
||||
this.composeInEdit(true);
|
||||
AppStore.composeInEdit(true);
|
||||
|
||||
var
|
||||
self = this,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue