feat(hamlog): read confirmations back from a HAMLOG.online ADIF
Their agent protocol has no download verb, so the return path is a file exported from their site. Running that file through the ordinary ADIF import is the wrong tool and does real damage: it matches on callsign + UTC minute + band + mode, their export is rebuilt from their own database and rarely agrees to the minute, and 'update duplicates' then inserts everything that failed to match -- several hundred copies of contacts already in the log. This path matches only. It stamps the confirmation on QSOs it finds, falls back to the mode-CLASS key for the modes their export renames, and REPORTS what it could not match instead of adding it: an unmatched confirmation is a question about the log, not a contact to create. Also logs and reports how many rows a delete actually removed -- silence there made a delete that did nothing indistinguishable from one that worked.
This commit is contained in:
@@ -4297,8 +4297,14 @@ export default function App() {
|
||||
if (deletingIds.length === 0) return;
|
||||
const ids = deletingIds;
|
||||
try {
|
||||
if (ids.length === 1) await DeleteQSO(ids[0]);
|
||||
else await DeleteQSOs(ids as any);
|
||||
// Report what was actually removed rather than assuming it matched what
|
||||
// was asked: a delete that silently removes nothing looks exactly like one
|
||||
// that worked, since the rows leave the grid when it reloads either way.
|
||||
if (ids.length === 1) { await DeleteQSO(ids[0]); showToast(t('toast.deletedOne')); }
|
||||
else {
|
||||
const n = await DeleteQSOs(ids as any);
|
||||
showToast(t('toast.deletedN', { n: Number(n ?? 0), asked: ids.length }));
|
||||
}
|
||||
setDeletingIds([]);
|
||||
setSelectedId(null);
|
||||
setSelectedIds([]);
|
||||
|
||||
Reference in New Issue
Block a user