@@ -238,7 +238,14 @@ impl ViewModel {
238238 }
239239
240240 Event :: Background ( BackgroundEvent :: UsbConnected ) => {
241- info ! ( "Found USB device" )
241+ info ! ( "Found USB device" ) ;
242+ self . tx_update
243+ . send ( ViewUpdate :: WaitingForDevice ( Device {
244+ id : "TODO: bogus" . to_string ( ) ,
245+ transport : Transport :: Usb ,
246+ } ) )
247+ . await
248+ . unwrap ( ) ;
242249 }
243250 // TODO: Add this event
244251 // Event::Background(BackgroundEvent::DevicesUpdated(devices)) => {
@@ -332,7 +339,14 @@ impl ViewModel {
332339 . unwrap ( )
333340 }
334341 Event :: Background ( BackgroundEvent :: NfcConnected ) => {
335- info ! ( "Found NFC device" )
342+ info ! ( "Found NFC device" ) ;
343+ self . tx_update
344+ . send ( ViewUpdate :: WaitingForDevice ( Device {
345+ id : "TODO: bogus" . to_string ( ) ,
346+ transport : Transport :: Nfc ,
347+ } ) )
348+ . await
349+ . unwrap ( ) ;
336350 }
337351
338352 Event :: Background ( BackgroundEvent :: NfcIdle | BackgroundEvent :: NfcWaiting ) => { }
@@ -348,6 +362,13 @@ impl ViewModel {
348362 }
349363 Event :: Background ( BackgroundEvent :: HybridConnecting ) => {
350364 self . hybrid_qr_code_data = None ;
365+ self . tx_update
366+ . send ( ViewUpdate :: WaitingForDevice ( Device {
367+ id : "TODO: bogus" . to_string ( ) ,
368+ transport : Transport :: HybridQr ,
369+ } ) )
370+ . await
371+ . unwrap ( ) ;
351372 self . tx_update
352373 . send ( ViewUpdate :: HybridConnecting )
353374 . await
0 commit comments