Fixed cleanTrashAfter
This commit is contained in:
parent
74bceaf1ee
commit
8d182f9362
@ -4,7 +4,7 @@ $line-height-base: 1.67;
|
||||
$line-height-title: 1.33;
|
||||
$font-size-monospace: 0.85em;
|
||||
$code-bg: rgba(0, 0, 0, 0.05);
|
||||
$info-bg: transparentize(#ffb000, 0.85);
|
||||
$info-bg: transparentize(#ffa000, 0.85);
|
||||
$code-border-radius: 2px;
|
||||
$link-color: #0c93e4;
|
||||
$error-color: #f20;
|
||||
|
@ -321,12 +321,9 @@ localDbSvc.sync()
|
||||
(utils.lastOpened + utils.cleanTrashAfter < Date.now())
|
||||
) {
|
||||
// Clean files
|
||||
store.getters['file/items'].forEach((file) => {
|
||||
// If file is in the trash
|
||||
if (file.parentId === 'trash') {
|
||||
store.dispatch('deleteFile', file.id);
|
||||
}
|
||||
});
|
||||
store.getters['file/items']
|
||||
.filter(file => file.parentId === 'trash') // If file is in the trash
|
||||
.forEach(file => store.dispatch('deleteFile', file.id));
|
||||
}
|
||||
|
||||
// watch file changing
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
origin,
|
||||
oauth2RedirectUri: `${origin}/oauth2/callback`,
|
||||
lastOpened,
|
||||
cleanTrashAfter: 7 * 1000, // 7 days
|
||||
cleanTrashAfter: 7 * 24 * 60 * 60 * 1000, // 7 days
|
||||
types: [
|
||||
'contentState',
|
||||
'syncedContent',
|
||||
|
Loading…
Reference in New Issue
Block a user