diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index d3177af..b32401c 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -554,6 +554,13 @@ final class RemoteStore: ObservableObject { self?.tailnetStatus = status self?.tailnetLoginURL = loginURL } + cb.pairingCodeReceived = { [weak self] qr in + guard let self else { return } + // Only apply while a request is outstanding — ignore a late reply after the user + // dismissed the sheet (we already told the host to cancel). + guard case .requesting = self.addDevice else { return } + self.addDevice = qr.map(AddDeviceState.ready) ?? .unavailable + } return cb }