fix notes list
This commit is contained in:
parent
86c2ff8ff6
commit
3b145cf219
11
main.js
11
main.js
|
@ -2343,11 +2343,11 @@ function toggletitle()
|
||||||
function selectnote()
|
function selectnote()
|
||||||
{
|
{
|
||||||
return searchinlist(
|
return searchinlist(
|
||||||
localdata.map(n =>
|
Object.values(notesindex).map(item =>
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
text: n.title,
|
text: item.title,
|
||||||
suffix: gettags(n).map(t => tagmark + t)
|
suffix: item.header.tags.map(t => tagmark + t)
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -2364,7 +2364,10 @@ function searchandloadnote()
|
||||||
{
|
{
|
||||||
selectnote().then(selected =>
|
selectnote().then(selected =>
|
||||||
{
|
{
|
||||||
loadnote(selected.text || selected);
|
var title = selected.text || selected;
|
||||||
|
var guid = Object.values(notesindex).find(i => i.title == title);
|
||||||
|
// todo: create a new one if not found
|
||||||
|
loadnote(guid);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue