|
本帖最后由 hechengjin 于 2016-4-13 18:49 编辑
https://dxr.mozilla.org/comm-cen ... countManager.idl#17
void addIncomingServerListener(in nsIIncomingServerListener serverListener);
void removeIncomingServerListener(in nsIIncomingServerListener serverListener);
https://dxr.mozilla.org/comm-cen ... rverListener.idl#11
void onServerLoaded(in nsIMsgIncomingServer server);
void onServerUnloaded(in nsIMsgIncomingServer server);
void onServerChanged(in nsIMsgIncomingServer server);
MemoryDatabase.js
中注册了 //删除文件夹 和重命名文件夹事件,造成账号删除时,会删除账号下的每个邮件夹中的邮件
registerGlodaFolderListener: function () {
let savedGloda = {
deleteFolderByID: GlodaDatastore.deleteFolderByID,
renameFolder: GlodaDatastore.renameFolder
}
}
MailServices.accounts.addIncomingServerListener(this)
// implements nsIIncomingServerListener
onServerLoaded: function (aServer) {
},
onServerUnloaded: function (aServer) {
console.log('######onServerUnloaded-------')
},
onServerChanged: function (aServer) {}
上面这个是在邮件夹删除之后,才发生,
所以直接把删除邮件夹的操作改成对应的修改邮件夹中所有邮件deleted标志为true的操作
|
|