зеркало из https://github.com/mozilla/gecko-dev.git
fix 368822 respect mail.biff.alert.show_preview and don't fetch preview text if it's not set, sr=mscott
This commit is contained in:
Родитель
1f836efe02
Коммит
98ed7aa271
|
@ -2037,6 +2037,8 @@
|
|||
// skip servers, Trash and Junk folders
|
||||
if (!aFolder || aFolder.isServer || aFolder.getFlag(kMsgPopupFolderFlagJunk) || aFolder.getFlag(kMsgPopupFolderFlagTrash))
|
||||
return false;
|
||||
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
var showPreviewText = pref.getBoolPref("mail.biff.alert.show_preview");
|
||||
var folderArray = new Array;
|
||||
if (aFolder.flags & MSG_FOLDER_FLAG_VIRTUAL)
|
||||
{
|
||||
|
@ -2069,6 +2071,9 @@
|
|||
if (!numMsgKeys.value)
|
||||
continue;
|
||||
|
||||
|
||||
if (showPreviewText)
|
||||
{
|
||||
// fetchMsgPreviewText forces the previewText property to get generated
|
||||
// for each of the message keys.
|
||||
try {
|
||||
|
@ -2082,7 +2087,7 @@
|
|||
aFolder.setMsgDatabase(null);
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
// if fetching the preview text is going to be an asynch operation and the caller
|
||||
// is set up to handle that fact, then don't bother filling in any of the fields since
|
||||
// we'll have to do this all over again when the fetch for the preview text completes.
|
||||
|
|
Загрузка…
Ссылка в новой задаче