diff --git a/apps/readest-app/src/app/reader/components/annotator/Annotator.tsx b/apps/readest-app/src/app/reader/components/annotator/Annotator.tsx index 58d738fd..62231223 100644 --- a/apps/readest-app/src/app/reader/components/annotator/Annotator.tsx +++ b/apps/readest-app/src/app/reader/components/annotator/Annotator.tsx @@ -357,6 +357,7 @@ const Annotator: React.FC<{ bookKey: string }> = ({ bookKey }) => { if (existingIndex !== -1) { views.forEach((view) => view?.addAnnotation(annotation, true)); if (update) { + annotation.id = annotations[existingIndex]!.id; annotations[existingIndex] = annotation; views.forEach((view) => view?.addAnnotation(annotation)); } else { diff --git a/apps/readest-app/src/app/reader/components/annotator/HighlightOptions.tsx b/apps/readest-app/src/app/reader/components/annotator/HighlightOptions.tsx index c3a207e0..8fc51e49 100644 --- a/apps/readest-app/src/app/reader/components/annotator/HighlightOptions.tsx +++ b/apps/readest-app/src/app/reader/components/annotator/HighlightOptions.tsx @@ -37,8 +37,8 @@ const HighlightOptions: React.FC = ({ onHandleHighlight(true); }; const handleSelectColor = (color: HighlightColor) => { - const style = globalReadSettings.highlightStyle; - globalReadSettings.highlightStyles[style] = color; + globalReadSettings.highlightStyle = selectedStyle; + globalReadSettings.highlightStyles[selectedStyle] = color; setSettings(settings); setSelectedColor(color); onHandleHighlight(true);