fix deleted visibility
This commit is contained in:
parent
7edb42ef83
commit
33bbafaf7f
22
main.js
22
main.js
|
@ -1368,18 +1368,6 @@ function init()
|
|||
}
|
||||
}
|
||||
|
||||
function getorcreate(guid, content)
|
||||
{
|
||||
var note = getnote(guid);
|
||||
/*if (!note)
|
||||
{
|
||||
note = {title: title, content: content, pos: content.length};
|
||||
localdata.push(note)
|
||||
}*/
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
function queryremote(params)
|
||||
{
|
||||
return new Promise( (apply, failed) => {
|
||||
|
@ -1552,9 +1540,13 @@ function loadnext()
|
|||
|
||||
function sortedlist(deleted)
|
||||
{
|
||||
// todo: fix deleted stuff
|
||||
deleted = deleted === true;
|
||||
return Object.values(metadata).filter(i => !deleted || i.deleted).sort( (i,j) => j.lastchanged - i.lastchanged);
|
||||
return Object
|
||||
.values(metadata)
|
||||
.filter(i =>
|
||||
{
|
||||
return deleted === true ? i.deleted : !i.deleted;
|
||||
})
|
||||
.sort( (i,j) => j.lastchanged - i.lastchanged);
|
||||
}
|
||||
|
||||
function grep(needle)
|
||||
|
|
Loading…
Reference in New Issue