-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support reader disconnect reason #628
Conversation
ios/Mappers.swift
Outdated
case DisconnectReason.disconnectRequested: return "disconnect requested" | ||
case DisconnectReason.rebootRequested: return "reboot requested" | ||
case DisconnectReason.securityReboot: return "security reboot" | ||
case DisconnectReason.criticallyLowBattery: return "critically low battery" | ||
case DisconnectReason.poweredOff: return "powered off" | ||
case DisconnectReason.bluetoothDisabled: return "bluetooth disabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't these (and the android ones) be mapping to the same strings found in src/types/Reader.ts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I defined it already in Reader.ts and each Mapper, but considering the grammar of Alert msg, I change the words in mapper but missed Reader.ts. Let me meke them consistent.
src/types/Reader.ts
Outdated
| 'disconnect requested' | ||
| 'reboot requested' | ||
| 'security reboot' | ||
| 'critically low battery' | ||
| 'powered off' | ||
| 'bluetooth disabled' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually use camelCase for these strings, can we keep these as disconnectRequested
etc and change the mappers in the native layer to follow that format? @ianlin-bbpos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll do it.
Summary
Support reader disconnect reason
Motivation
Support new reader disconnected callback and disconnect reason enum.
Testing
Documentation
Select one: