Unverified Commit 5b9403c0 authored by Hanwen Cheng's avatar Hanwen Cheng Committed by GitHub
Browse files

add missing commits (#604)

parent 66d938a1
Pipeline #91078 failed with stages
in 3 minutes and 42 seconds
......@@ -52,10 +52,10 @@ export function Scanner({
totalFramesCount: 0
});
useEffect((): (() => void) => {
const unsubscribeFocus = navigation.addListener(
'focus',
scannerStore.setReady.bind(scannerStore)
);
const unsubscribeFocus = navigation.addListener('focus', () => {
setLastFrame(null);
scannerStore.setReady();
});
const unsubscribeBlur = navigation.addListener(
'blur',
scannerStore.setBusy.bind(scannerStore)
......
......@@ -73,6 +73,7 @@ export const onMockBarCodeRead = async (
): Promise<void> => {
const scanRequest = scanRequestDataMap[txRequest];
if (typeof scanRequest === 'string') {
await timeout(200);
await onBarCodeRead(buildSignRequest(scanRequest));
} else if (Array.isArray(scanRequest)) {
for (const rawData of scanRequest as string[]) {
......@@ -80,6 +81,7 @@ export const onMockBarCodeRead = async (
await onBarCodeRead(buildSignRequest(rawData));
}
} else if (typeof scanRequest === 'object') {
await timeout(200);
await onBarCodeRead(
buildSignRequest(scanRequest.rawData, scanRequest.data)
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment