mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 07:39:27 +01:00
Backport commit r48054, committed by Nathan Gray. Directly delete any trash cache when trash is emptied
This commit is contained in:
parent
fd976ea1dc
commit
2437553215
@ -1478,6 +1478,22 @@ app.classes.mail = AppJS.extend(
|
|||||||
this.egw.message(this.egw.lang('empty trash'));
|
this.egw.message(this.egw.lang('empty trash'));
|
||||||
egw.json('mail.mail_ui.ajax_emptyTrash',[server[0], activeFilters['selectedFolder']? activeFilters['selectedFolder']:null],function(){self.unlock_tree()})
|
egw.json('mail.mail_ui.ajax_emptyTrash',[server[0], activeFilters['selectedFolder']? activeFilters['selectedFolder']:null],function(){self.unlock_tree()})
|
||||||
.sendRequest(true);
|
.sendRequest(true);
|
||||||
|
|
||||||
|
// Directly delete any trash cache for selected server
|
||||||
|
if(window.localStorage)
|
||||||
|
{
|
||||||
|
for(var i = 0; i < window.localStorage.length; i++)
|
||||||
|
{
|
||||||
|
var key = window.localStorage.key(i);
|
||||||
|
|
||||||
|
// Find directly by what the key would look like
|
||||||
|
if(key.indexOf('cached_fetch_mail::{"selectedFolder":"'+server[0]+'::') == 0 &&
|
||||||
|
key.toLowerCase().indexOf(egw.lang('trash').toLowerCase()) > 0)
|
||||||
|
{
|
||||||
|
window.localStorage.removeItem(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user