if(note->resource_id == 0) {
// new note
note_store_new_note_async(obj, note, NULL, NULL);
- notebook->disable_selection_events = TRUE;
- int index = notebook->notes->count(notebook->notes);
- ui_list_append(notebook->notes, note);
- notebook->notes->update(notebook->notes, index);
- notebook->disable_selection_events = FALSE;
} else {
note_store_save_note_async(obj, note, NULL, NULL);
}
// initialize note content
// possible to implement something like note templates here
editor_load_markdown(new_note, model->window->textview, cx_mutstrn("", 0));
+
+ ui_list_append(model->notes, new_note);
+ ui_list_update(model->notes);
}
typedef struct NoteDeleteOp {