зеркало из https://github.com/mozilla/snowl.git
fix for message object changes in 9e95bd373024; deletion handling tweak.
This commit is contained in:
Родитель
afb16d1c26
Коммит
a05a3c7a79
|
@ -397,7 +397,8 @@ this._log.info("onClick: START itemIds - " +this.itemIds.toSource());
|
|||
},
|
||||
|
||||
onCommandPurgeDeletedButton: function(aEvent) {
|
||||
gMessageViewWindow.SnowlMessageView.onDeleteMessages();
|
||||
let deleteAllShowing = true;
|
||||
gMessageViewWindow.SnowlMessageView.onDeleteMessages(deleteAllShowing);
|
||||
},
|
||||
|
||||
_resetCollectionsView: true,
|
||||
|
@ -820,7 +821,7 @@ this._log.info("removeAuthor: Removing author - " + query.queryName + " : " + se
|
|||
}
|
||||
},
|
||||
|
||||
isMessageForSelectedCollection: function(aMessageObj) {
|
||||
isMessageForSelectedCollection: function(aMessage) {
|
||||
// Determine if source or author of new message is currently selected in the
|
||||
// collections list.
|
||||
// XXX: see if there is a Places event/mechanism we can use instead?
|
||||
|
@ -837,9 +838,9 @@ this._log.info("removeAuthor: Removing author - " + query.queryName + " : " + se
|
|||
uri = this._tree.view.nodeForTreeIndex(index).uri;
|
||||
query = new SnowlQuery(uri);
|
||||
if ((query.queryGroupIDColumn == "sources.id" &&
|
||||
query.queryID == aMessageObj.sourceID) ||
|
||||
(query.queryGroupIDColumn == "authors.id" &&
|
||||
query.queryID == aMessageObj.authorID) ||
|
||||
query.queryID == aMessage.source.id) ||
|
||||
(query.queryGroupIDColumn == "people.id" &&
|
||||
query.queryID == aMessage.author.id) ||
|
||||
// Collection folders that return all records
|
||||
query.queryFolder == SnowlPlaces.collectionsSystemID)
|
||||
refreshFlag = true;
|
||||
|
|
|
@ -629,15 +629,16 @@ this._log.info("_toggleRead: all? " + aAll);
|
|||
this._deleteMessages(aMessage, selectedRows);
|
||||
},
|
||||
|
||||
onDeleteMessages: function() {
|
||||
onDeleteMessages: function(aDeleteAllShowing) {
|
||||
//this._log.info("onDeleteMessages: START");
|
||||
// List context menu single/multiselection deletion of selected messages.
|
||||
// Create an array of messages and list rows to pass on.
|
||||
let messages = [], selectedRows = [];
|
||||
let rangeFirst = { }, rangeLast = { };
|
||||
|
||||
if (this.Filters["deleted"])
|
||||
// Showing deleted messages, thus a purge is requested. Select the whole list.
|
||||
if (aDeleteAllShowing)
|
||||
// Purge is requested via button. Select the whole list. Otherwise just
|
||||
// the selected items in the 'show deleted' list via context menu delete.
|
||||
this._tree.view.selection.selectAll();
|
||||
|
||||
let numRanges = this._tree.view.selection.getRangeCount();
|
||||
|
|
Загрузка…
Ссылка в новой задаче