fix(log): say why a callsign was not logged instead of dropping it
`submit()` opened with `if (call.length < 3) return`. During a pass the operator typed a callsign, pressed done, and nothing happened - no entry, no message, no way to tell the app had decided against them. None of the logging software surveyed for this work - N1MM+, DXLog, PoLo, HAMRS - discards a submission silently. Validation is deliberately loose, because strictness costs more than it saves. Checked against 28 real callsigns, a typical strict pattern rejects 16 of them: W1AW/4, 2E0ABC, 9A1CCY and SV2ASP/A among others. A pattern permissive enough to accept those also accepts a Maidenhead locator as a callsign. There is no regex that catches typos without throwing away legitimate calls, so CallsignEntry rejects only what cannot be a callsign - empty, one character, illegal characters, all digits, all letters - and reports doubt as a warning that still logs the contact. Two warnings exist. A six-character grid-shaped entry says so, because grid and callsign are exchanged together on FM satellites and the fields sit side by side. A station already worked this pass says so too, without blocking: the same station on a later pass is a legitimate new contact, and contest loggers default to working duplicates - DXLog describes refusing them as an outdated habit. That warning also replaces the duplicate suppression, which was a 300ms window comparing the last callsign, admitted in its own comment to be a workaround. It could silently discard a real second contact, and a set of calls worked this pass is both honest and more useful. It survives configuration changes via rememberSaveable. Not addressed here: the QRZ grid backfill still reads the cookie out of SharedPreferences from inside a composable through LocalContext, and still reports nothing when a lookup fails. IQrzGridLookup is added for that, but wiring it needs the container, the view model and the UI to change together.
This commit is contained in:
1 parent
2ff8643988
commit
e0900778f0
6 files changed
+348
-12
No files matched your search
@@ -260,6 +260,15 @@
|
||||
<string name="wavelog_call_hint">对方呼号</string>
|
||||
<string name="wavelog_mode_hint">模式</string>
|
||||
<string name="wavelog_saved">已存入本地日志</string>
|
||||
<string name="log_call_too_short">呼号太短</string>
|
||||
<string name="log_call_illegal">呼号里不能有这个字符</string>
|
||||
<string name="log_call_not_a_call">这看起来不像呼号</string>
|
||||
<string name="log_call_too_long">呼号太长</string>
|
||||
<string name="log_warn_grid">已保存 - 但这看起来像网格而不是呼号</string>
|
||||
<string name="log_warn_worked">已保存 - %1$s 本圈已经通联过</string>
|
||||
<string name="log_grid_no_cookie">查网格需要先在设置里填 QRZ Cookie</string>
|
||||
<string name="log_grid_signed_out">QRZ Cookie 已过期 - 请在设置里重新粘贴</string>
|
||||
<string name="log_grid_unreachable">连不上 QRZ, 没查到网格</string>
|
||||
<string name="wavelog_need_config">请先在设置中配置 WaveLog</string>
|
||||
<string name="wavelog_empty">暂无日志记录</string>
|
||||
<string name="wavelog_grid_mismatch">当前 QTH 网格(%1$s)与站点网格(%2$s)不一致,仍要上传?</string>
|
||||
|
||||
@@ -291,6 +291,15 @@
|
||||
<string name="wavelog_call_hint">Callsign</string>
|
||||
<string name="wavelog_mode_hint">Mode</string>
|
||||
<string name="wavelog_saved">Saved to local log</string>
|
||||
<string name="log_call_too_short">Callsign too short</string>
|
||||
<string name="log_call_illegal">A callsign cannot contain that</string>
|
||||
<string name="log_call_not_a_call">That does not look like a callsign</string>
|
||||
<string name="log_call_too_long">Callsign too long</string>
|
||||
<string name="log_warn_grid">Saved - that looks like a grid, not a callsign</string>
|
||||
<string name="log_warn_worked">Saved - %1$s was already worked this pass</string>
|
||||
<string name="log_grid_no_cookie">Grid lookup needs a QRZ cookie in Settings</string>
|
||||
<string name="log_grid_signed_out">QRZ cookie expired - paste a fresh one in Settings</string>
|
||||
<string name="log_grid_unreachable">Could not reach QRZ for the grid</string>
|
||||
<string name="wavelog_need_config">Configure WaveLog in Settings first</string>
|
||||
<string name="wavelog_empty">No log entries yet</string>
|
||||
<string name="wavelog_grid_mismatch">QTH grid (%1$s) does not match station grid (%2$s). Upload anyway?</string>
|
||||
|
||||
Reference in new issue
Block a user