diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e69145..b0b58bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project are documented in this file. +## [1.116.2] - 2026-09-05 + +### Fixed +- The remove action now applies to saved local location suggestions only. + OpenStreetMap search results remain available, while removed saved locations + are deleted from the user's stored location list. + ## [1.116.1] - 2026-09-05 ### Fixed diff --git a/package-lock.json b/package-lock.json index 3a57e2c..86adcce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "my-weekly-todo-list", - "version": "1.116.1", + "version": "1.116.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "my-weekly-todo-list", - "version": "1.116.1", + "version": "1.116.2", "license": "MIT", "dependencies": { "@auth/prisma-adapter": "^2.11.1", diff --git a/package.json b/package.json index d1a1301..30e68b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.116.1", + "version": "1.116.2", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/components/CalendarEventModal.tsx b/src/components/CalendarEventModal.tsx index fb899d7..c77a289 100644 --- a/src/components/CalendarEventModal.tsx +++ b/src/components/CalendarEventModal.tsx @@ -91,6 +91,7 @@ interface CalendarEventModalProps { language?: string; savedLocations?: string[]; onSaveLocation?: (loc: string) => void; + onRemoveLocation?: (loc: string) => void; customReminderMinutes?: number[]; onSaveCustomReminder?: (minutes: number) => void; onClose: () => void; @@ -108,6 +109,7 @@ export default function CalendarEventModal({ language = 'en', savedLocations = [], onSaveLocation, + onRemoveLocation, customReminderMinutes = [], onSaveCustomReminder, onClose, @@ -208,10 +210,11 @@ export default function CalendarEventModal({ const locationSearchTimerRef = useRef | null>(null); const locationAbortRef = useRef(null); const dismissedLocationSuggestionsRef = useRef>(new Set()); - const dismissLocationSuggestion = useCallback((label: string) => { - dismissedLocationSuggestionsRef.current.add(label.toLowerCase()); - setLocationSuggestions(current => current.filter(suggestion => suggestion.label !== label)); - }, []); + const dismissLocationSuggestion = useCallback((suggestion: LocationSuggestion) => { + dismissedLocationSuggestionsRef.current.add(suggestion.label.toLowerCase()); + setLocationSuggestions(current => current.filter(item => item.label !== suggestion.label)); + if (suggestion.source === 'saved') onRemoveLocation?.(suggestion.label); + }, [onRemoveLocation]); const dismissLocationSuggestions = useCallback(() => { ++locationRequestRef.current; locationAbortRef.current?.abort(); @@ -891,13 +894,15 @@ export default function CalendarEventModal({ {suggestion.label} {suggestion.source === 'openstreetmap' && ( + OpenStreetMap + )} + {suggestion.source === 'saved' && ( <> - OpenStreetMap