Page MenuHomePhabricator

[native] modify SecondaryDeviceQRCodeScanner to support emulator
Needs RevisionPublic

Authored by varun on Fri, Jun 28, 12:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 6:25 PM
Unknown Object (File)
Sat, Jun 29, 1:48 AM
Unknown Object (File)
Sat, Jun 29, 1:48 AM
Unknown Object (File)
Sat, Jun 29, 1:45 AM
Subscribers

Details

Reviewers
ashoat
bartek
Summary

if we're trying to add a device from an iOS simulator or android emulator, we should just display a TextInput where the user can paste the QR Code URL

Depends on D12619

Test Plan

if device is added successfully, we are navigated back upon acknowledging the alert

if device can't be added successfully, we are navigated back when the alert fires

adding keyserver as secondary device works -- appears in DDB correctly

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Fri, Jun 28, 1:13 PM
native/profile/secondary-device-qr-code-scanner.react.js
169

You did use the alert constants above, but not here

ashoat requested changes to this revision.Mon, Jul 1, 5:25 PM

Love some of the improvements you made to the existing code, such as passing more specific data into the hooks

Requesting chnages for some questions, and to remove the button for non-emulators

native/profile/secondary-device-qr-code-scanner.react.js
61

Nit

169

Personally, I'm not sure factoring it out is necessary if the string isn't duplicated elsewhere. I'd probably inline secondaryDeviceRegisteredAlertDetails

248

Is this logic copied from somewhere? Wondering how the QR code parsing happens when we get the URL via a deep link, versus this new method

If it's duplicated, would be good to factor out

251

Did you forget to remove this console.log?

263–273

Don't we want to only show this button when deviceIsEmulator?

This revision now requires changes to proceed.Mon, Jul 1, 5:25 PM