v1.1.8 - Fix image paste persistence, save-flush on note switch, WebKitGTK clipboard fallback

This commit is contained in:
Yuri Karamian
2026-02-25 01:02:45 +01:00
parent 25d4cf7a9d
commit 1440bdcd90
8 changed files with 361 additions and 34 deletions
+3 -1
View File
@@ -35,9 +35,10 @@
import { openNoteWindow } from '$lib/utils/window';
import type { NoteEntry, SortMode } from '$lib/types';
let { onNoteSelected = (_path: string, _content: string) => {}, onNoteMoved = () => {} }: {
let { onNoteSelected = (_path: string, _content: string) => {}, onNoteMoved = () => {}, onBeforeNoteSwitch = () => {} }: {
onNoteSelected?: (path: string, content: string) => void;
onNoteMoved?: () => void;
onBeforeNoteSwitch?: () => void;
} = $props();
const modKey = navigator.platform.startsWith('Mac') ? '⌘' : 'Ctrl';
@@ -184,6 +185,7 @@
if ($activeNotePath === note.path) return;
try {
const content = await readNote(note.path);
onBeforeNoteSwitch();
$activeNote = content;
$activeNotePath = note.path;
$editorDirty = false;