Fix duplicate messages in the Drafts folder.

This commit is contained in:
RainLoop Team 2013-12-12 23:33:41 +04:00
parent abc821c461
commit be150d7fc9
5 changed files with 16 additions and 50 deletions

View file

@ -7896,7 +7896,6 @@ function PopupsComposeViewModel()
this.draftFolder = ko.observable('');
this.draftUid = ko.observable('');
this.draftID = ko.observable('');
this.sending = ko.observable(false);
this.saving = ko.observable(false);
this.attachments = ko.observableArray([]);
@ -7918,7 +7917,7 @@ function PopupsComposeViewModel()
}, this);
this.isDraftFolderMessage = ko.computed(function () {
return '' !== this.draftFolder() && '' !== this.draftUid() && '' !== this.draftID();
return '' !== this.draftFolder() && '' !== this.draftUid();
}, this);
this.composeUploaderButton = ko.observable(null);
@ -8118,7 +8117,6 @@ function PopupsComposeViewModel()
this.sendMessageResponse,
this.draftFolder(),
this.draftUid(),
this.draftID(),
sSentFolder,
this.currentIdentityResultEmail(),
sTo,
@ -8154,7 +8152,6 @@ function PopupsComposeViewModel()
this.saveMessageResponse,
this.draftFolder(),
this.draftUid(),
this.draftID(),
RL.data().draftFolder(),
this.currentIdentityResultEmail(),
this.to(),
@ -8372,7 +8369,6 @@ PopupsComposeViewModel.prototype.saveMessageResponse = function (sResult, oData)
this.draftFolder(oData.Result.NewFolder);
this.draftUid(oData.Result.NewUid);
this.draftID(oData.Result.NewID);
if (this.modalVisibility())
{
@ -8532,7 +8528,6 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.draftFolder(oMessage.folderFullNameRaw);
this.draftUid(oMessage.uid);
this.draftID(oMessage.messageId());
this.subject(sSubject);
this.prepearMessageAttachments(oMessage, sComposeType);
@ -9194,7 +9189,6 @@ PopupsComposeViewModel.prototype.reset = function ()
this.draftFolder('');
this.draftUid('');
this.draftID('');
this.sending(false);
this.saving(false);
@ -14309,7 +14303,6 @@ WebMailAjaxRemoteStorage.prototype.messageSetSeenToAll = function (fCallback, sF
* @param {?Function} fCallback
* @param {string} sMessageFolder
* @param {string} sMessageUid
* @param {string} sMessageID
* @param {string} sDraftFolder
* @param {string} sFrom
* @param {string} sTo
@ -14323,13 +14316,12 @@ WebMailAjaxRemoteStorage.prototype.messageSetSeenToAll = function (fCallback, sF
* @param {string} sInReplyTo
* @param {string} sReferences
*/
WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFolder, sMessageUid, sMessageID, sDraftFolder,
WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFolder, sMessageUid, sDraftFolder,
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences)
{
this.defaultRequest(fCallback, 'SaveMessage', {
'MessageFolder': sMessageFolder,
'MessageUid': sMessageUid,
'MessageID': sMessageID,
'DraftFolder': sDraftFolder,
'From': sFrom,
'To': sTo,
@ -14349,7 +14341,6 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
* @param {?Function} fCallback
* @param {string} sMessageFolder
* @param {string} sMessageUid
* @param {string} sMessageID
* @param {string} sSentFolder
* @param {string} sFrom
* @param {string} sTo
@ -14363,13 +14354,12 @@ WebMailAjaxRemoteStorage.prototype.saveMessage = function (fCallback, sMessageFo
* @param {string} sInReplyTo
* @param {string} sReferences
*/
WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFolder, sMessageUid, sMessageID, sSentFolder,
WebMailAjaxRemoteStorage.prototype.sendMessage = function (fCallback, sMessageFolder, sMessageUid, sSentFolder,
sFrom, sTo, sCc, sBcc, sSubject, bTextIsHtml, sText, aAttachments, aDraftInfo, sInReplyTo, sReferences)
{
this.defaultRequest(fCallback, 'SendMessage', {
'MessageFolder': sMessageFolder,
'MessageUid': sMessageUid,
'MessageID': sMessageID,
'SentFolder': sSentFolder,
'From': sFrom,
'To': sTo,
@ -15669,9 +15659,6 @@ function RainLoopApp()
this.oRemote = null;
this.oCache = null;
this.iSuggestionsLimit = Utils.pInt(this.settingsGet('SuggestionsLimit'));
this.iSuggestionsLimit = 0 === this.iSuggestionsLimit ? 20 : this.iSuggestionsLimit;
this.quotaDebounce = _.debounce(this.quota, 1000 * 30);
$.wakeUp(function () {

File diff suppressed because one or more lines are too long