Переделал механизм удаления recent

This commit is contained in:
Book Pauk
2019-03-18 19:38:47 +07:00
parent 20697ad9e4
commit e626cb6b40
2 changed files with 22 additions and 7 deletions

View File

@@ -141,9 +141,11 @@ class HistoryPage extends Vue {
let result = [];
const sorted = bookManager.getSortedRecent();
const len = (sorted.length < 100 ? sorted.length : 100);
for (let i = 0; i < len; i++) {
for (let i = 0; i < sorted.length; i++) {
const book = sorted[i];
if (book.deleted)
continue;
let d = new Date();
d.setTime(book.touchTime);
const t = formatDate(d).split(' ');
@@ -193,6 +195,8 @@ class HistoryPage extends Vue {
path: book.path,
key: book.key,
});
if (result.length >= 100)
break;
}
const search = this.search;