Fixed cleanTrashAfter

This commit is contained in:
benweet 2017-10-07 12:36:10 +01:00
parent 74bceaf1ee
commit 8d182f9362
3 changed files with 5 additions and 8 deletions

View File

@ -4,7 +4,7 @@ $line-height-base: 1.67;
$line-height-title: 1.33; $line-height-title: 1.33;
$font-size-monospace: 0.85em; $font-size-monospace: 0.85em;
$code-bg: rgba(0, 0, 0, 0.05); $code-bg: rgba(0, 0, 0, 0.05);
$info-bg: transparentize(#ffb000, 0.85); $info-bg: transparentize(#ffa000, 0.85);
$code-border-radius: 2px; $code-border-radius: 2px;
$link-color: #0c93e4; $link-color: #0c93e4;
$error-color: #f20; $error-color: #f20;

View File

@ -321,12 +321,9 @@ localDbSvc.sync()
(utils.lastOpened + utils.cleanTrashAfter < Date.now()) (utils.lastOpened + utils.cleanTrashAfter < Date.now())
) { ) {
// Clean files // Clean files
store.getters['file/items'].forEach((file) => { store.getters['file/items']
// If file is in the trash .filter(file => file.parentId === 'trash') // If file is in the trash
if (file.parentId === 'trash') { .forEach(file => store.dispatch('deleteFile', file.id));
store.dispatch('deleteFile', file.id);
}
});
} }
// watch file changing // watch file changing

View File

@ -41,7 +41,7 @@ export default {
origin, origin,
oauth2RedirectUri: `${origin}/oauth2/callback`, oauth2RedirectUri: `${origin}/oauth2/callback`,
lastOpened, lastOpened,
cleanTrashAfter: 7 * 1000, // 7 days cleanTrashAfter: 7 * 24 * 60 * 60 * 1000, // 7 days
types: [ types: [
'contentState', 'contentState',
'syncedContent', 'syncedContent',