(attempt int, manualOnly bool, enableSliderPOC bool)
| 78 | ) |
| 79 | |
| 80 | func captchaSolveModeForAttempt(attempt int, manualOnly bool, enableSliderPOC bool) (captchaSolveMode, bool) { |
| 81 | if manualOnly { |
| 82 | return captchaSolveModeManual, attempt == 0 |
| 83 | } |
| 84 | |
| 85 | switch attempt { |
| 86 | case 0: |
| 87 | return captchaSolveModeAuto, true |
| 88 | case 1: |
| 89 | if enableSliderPOC { |
| 90 | return captchaSolveModeSliderPOC, true |
| 91 | } |
| 92 | return captchaSolveModeManual, true |
| 93 | case 2: |
| 94 | if enableSliderPOC { |
| 95 | return captchaSolveModeManual, true |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | return 0, false |
| 100 | } |
| 101 | |
| 102 | func captchaSolveModeLabel(mode captchaSolveMode) string { |
| 103 | switch mode { |
no outgoing calls