Make HUNT and CQ mutually exclusive#160
Merged
Merged
Conversation
HUNT (auto-answer CQ) and the CQ button were independent, so both could be active at once. Disable each while the other is selected: the CQ button greys out and stops responding while HUNT is on, and the HUNT pill greys out while you're actively running CQ. Pressing STOP returns to the neutral state where either mode can be chosen again. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #160 +/- ##
==========================================
+ Coverage 6.23% 6.37% +0.13%
- Complexity 669 678 +9
==========================================
Files 267 268 +1
Lines 30629 30841 +212
Branches 4774 4824 +50
==========================================
+ Hits 1911 1967 +56
- Misses 28577 28732 +155
- Partials 141 142 +1
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the TxStrip Compose UI to prevent users from entering conflicting transmit modes by making HUNT (auto-answer CQ) and CQ mutually exclusive, reducing confusing overlap between “running CQ” and “hunting”.
Changes:
- Disable (grey out + ignore taps) the HUNT pill while
isActivatedis true (unless HUNT is already on). - Disable (grey out + ignore taps) the CQ button while HUNT is enabled (unless
isActivatedis true so STOP still works). - Adjust background/text colors to visually reflect disabled vs active states.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
160
to
164
| modifier = Modifier | ||
| .clip(RoundedCornerShape(6.dp)) | ||
| .background(huntBg) | ||
| .clickable { onToggleHunt() } | ||
| .then(if (huntDisabled) Modifier else Modifier.clickable { onToggleHunt() }) | ||
| .padding(horizontal = 8.dp, vertical = 4.dp), |
Comment on lines
195
to
202
| modifier = Modifier | ||
| .clip(RoundedCornerShape(8.dp)) | ||
| .background(buttonBg) | ||
| .clickable { if (isActivated) onStop() else onCallCQ() } | ||
| .then( | ||
| if (cqDisabled) Modifier | ||
| else Modifier.clickable { if (isActivated) onStop() else onCallCQ() } | ||
| ) | ||
| .padding(horizontal = 18.dp, vertical = 9.dp), |
Address Copilot review on PR #160. The mutual-exclusion disable was done by dropping the .clickable modifier entirely when a button shouldn't be tappable, which also strips its button accessibility semantics -- TalkBack sees no control at all rather than a disabled one. Switch both the HUNT pill and the CQ/STOP button to clickable(enabled = !disabled). Taps are ignored exactly as before, but the control stays exposed to assistive tech as a disabled button. Also simpler than the .then(if … else …) it replaces. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
HUNT (auto-answer CQ) and the CQ button were independent controls, so both could be active at the same time — the confusing "crossover" between the two modes.
This makes them mutually exclusive in
TxStrip:isActivated) → the HUNT pill greys out and stops responding to taps.The
&& !huntEnabled/&& !isActivatedguards keep edge cases sane: if a QSO auto-starts while hunting, STOP still works and HUNT stays toggleable.Testing
Built and installed on the Pixel 8 (
gradlew.bat installDebug→ BUILD SUCCESSFUL).🤖 Generated with Claude Code