зеркало из https://github.com/mozilla/gecko-dev.git
Only refresh after EmptyTrash if the trash is the currently selected folder.
This commit is contained in:
Родитель
7d6658918b
Коммит
447605d0a7
|
@ -474,4 +474,26 @@ function OpenToFolder(item, folderURI)
|
|||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function IsSpecialFolderSelected(folderName)
|
||||
{
|
||||
var selectedFolder = GetThreadTreeFolder();
|
||||
var id = selectedFolder.getAttribute('ref');
|
||||
var folderResource = RDF.GetResource(id);
|
||||
if(!folderResource)
|
||||
return false;
|
||||
|
||||
var folderTree = GetFolderTree();
|
||||
var db = folderTree.database;
|
||||
var db = db.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
|
||||
var property = RDF.GetResource('http://home.netscape.com/NC-rdf#SpecialFolder');
|
||||
var result = db.GetTarget(folderResource, property , true);
|
||||
result = result.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
if(result.Value == folderName)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,13 @@ function MsgEmptyTrash()
|
|||
var folder;
|
||||
folder = folderList[0];
|
||||
if (folder)
|
||||
{
|
||||
messenger.EmptyTrash(tree.database, folder);
|
||||
if(IsSpecialFolderSelected('Trash'))
|
||||
{
|
||||
RefreshThreadTreeView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче