Skip to content

Feat/optimizations#12

Open
kvbalib wants to merge 5 commits into
masterfrom
feat/optimizations
Open

Feat/optimizations#12
kvbalib wants to merge 5 commits into
masterfrom
feat/optimizations

Conversation

@kvbalib
Copy link
Copy Markdown
Owner

@kvbalib kvbalib commented May 7, 2026

No description provided.

kvbalib and others added 5 commits May 7, 2026 18:54
- toggleScan() now registers the BroadcastReceiver and bails on non-Lecom
  hardware, fixing the path where consumers call toggleScan without
  mounting useLecomScan first (scans fired but JS heard nothing).
- stop() wraps stopScan() in try/catch to survive stale device handles
  during teardown.
- Cache the android.device.ScanDevice availability check once on the
  companion object instead of looking it up on every init.
- useLecomScan now stores callback in a ref so its identity does not
  tear down and re-init the native receiver on every render.
- Drop unused Activity import; replace untyped @ts-expect-error with a
  typed cast on globalThis.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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