diff --git a/src/components/DXFilterManager.jsx b/src/components/DXFilterManager.jsx index 377da25..a9c69b6 100644 --- a/src/components/DXFilterManager.jsx +++ b/src/components/DXFilterManager.jsx @@ -279,7 +279,7 @@ export const DXFilterManager = ({ filters, onFilterChange, isOpen, onClose }) =>
- Exclude List - Hide these callsigns + Exclude List - Hide DX callsigns beginning with:
{ // Watchlist only mode - must match watchlist if (filters.watchlistOnly && filters.watchlist?.length > 0) { const matchesWatchlist = filters.watchlist.some(w => - spot.call?.toUpperCase().includes(w.toUpperCase()) || - spot.spotter?.toUpperCase().includes(w.toUpperCase()) + spot.call?.toUpperCase().includes(w.toUpperCase()) ); if (!matchesWatchlist) return false; } - // Exclude list - hide matching calls + // Exclude list - hide matching calls - match the call as a prefix if (filters.excludeList?.length > 0) { const isExcluded = filters.excludeList.some(exc => - spot.call?.toUpperCase().includes(exc.toUpperCase()) || - spot.spotter?.toUpperCase().includes(exc.toUpperCase()) + spot.call?.toUpperCase().startsWith(exc.toUpperCase()) ); if (isExcluded) return false; } diff --git a/src/utils/callsign.js b/src/utils/callsign.js index 2207fa2..64b829d 100644 --- a/src/utils/callsign.js +++ b/src/utils/callsign.js @@ -242,8 +242,7 @@ export const filterDXPaths = (paths, filters) => { // Exclude list - hide matching callsigns if (filters.excludeList?.length > 0) { const isExcluded = filters.excludeList.some(e => - path.dxCall?.toUpperCase().includes(e.toUpperCase()) || - path.spotter?.toUpperCase().includes(e.toUpperCase()) + path.dxCall?.toUpperCase().startsWith(e.toUpperCase()) ); if (isExcluded) return false; }