Skip to content

refactor(enable_deauth): extract duplicated behave logic to helper#30

Open
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
CoderFX:fix/enable-deauth-refactor
Open

refactor(enable_deauth): extract duplicated behave logic to helper#30
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
CoderFX:fix/enable-deauth-refactor

Conversation

@CoderFX
Copy link
Copy Markdown

@CoderFX CoderFX commented Mar 12, 2026

Summary

The home network detection code was duplicated between on_unfiltered_ap_list and on_bcap_wifi_ap_new, including identical label toggling logic.

  • Extract into _set_behave() helper method
  • Simplify on_unfiltered_ap_list using any() generator
  • on_bcap_wifi_ap_new now delegates to _set_behave()

No behavior change — just DRY refactor.

Builds on #29. Related to #24.

CoderFX added 3 commits March 12, 2026 14:17
- Replace bare `except Exception` with `except ImportError` for Touch_UI import
- Replace deprecated `logging.warn()` with `logging.warning()`
- Add consistent [Enable_Deauth] prefix to all log messages
- Remove trailing semicolons
- Use logging.warning for errors instead of logging.info
- Bump version to 1.0.1
- Remove unused self._current_aps list (never read anywhere)
- Remove stale TODO comment about web UI (never implemented)
- Fix inconsistent log prefix: [EnableDeauth] -> [Enable_Deauth]
- Remove unused Touch_Screen import
- Remove unnecessary try/except in on_ui_update
- Bump version to 1.0.2
The home network detection code was duplicated between
on_unfiltered_ap_list and on_bcap_wifi_ap_new, including the
label toggling logic. Extract into _set_behave() helper.

Also simplifies on_unfiltered_ap_list using any() generator.

- Bump version to 1.0.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant