hoisting notes WIP

This commit is contained in:
azivner
2018-12-11 21:53:56 +01:00
parent 8171b68b18
commit 6fbf28b30d
8 changed files with 67 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
import optionsInit from './options_init.js';
import server from "./server.js";
let hoistedNoteId;
optionsInit.optionsReady.then(options => {
hoistedNoteId = options['hoistedNoteId'];
});
async function getHoistedNoteId() {
await optionsInit.optionsReady;
return hoistedNoteId;
}
async function setHoistedNoteId(noteId) {
hoistedNoteId = noteId;
await server.put('options/hoistedNoteId/' + noteId);
}
export default {
getHoistedNoteId,
setHoistedNoteId
}