mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(react/dialogs): undelete note not working
This commit is contained in:
parent
238f358d6a
commit
d7c4b8f530
@ -135,19 +135,17 @@ function DeletedNoteLink({ change, setShown }: { change: RecentChangeRow, setSho
|
||||
<span className="note-title">{change.current_title}</span>
|
||||
|
||||
(<a href="javascript:"
|
||||
onClick={() => {
|
||||
async () => {
|
||||
const text = t("recent_changes.confirm_undelete");
|
||||
onClick={async () => {
|
||||
const text = t("recent_changes.confirm_undelete");
|
||||
|
||||
if (await dialog.confirm(text)) {
|
||||
await server.put(`notes/${change.noteId}/undelete`);
|
||||
setShown(false);
|
||||
await ws.waitForMaxKnownEntityChangeId();
|
||||
if (await dialog.confirm(text)) {
|
||||
await server.put(`notes/${change.noteId}/undelete`);
|
||||
setShown(false);
|
||||
await ws.waitForMaxKnownEntityChangeId();
|
||||
|
||||
const activeContext = appContext.tabManager.getActiveContext();
|
||||
if (activeContext) {
|
||||
activeContext.setNote(change.noteId);
|
||||
}
|
||||
const activeContext = appContext.tabManager.getActiveContext();
|
||||
if (activeContext) {
|
||||
activeContext.setNote(change.noteId);
|
||||
}
|
||||
}
|
||||
}}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user