mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-07 11:19:58 +02:00
feat(apple): send a transfer to a device from the share panel
Send to a device now sits alongside the QR code, NFC, and export actions, since an offer is another way to deliver the same invitation. Picking a device pushes the existing transfer rather than re-sharing the files. The picker lists only devices holding a live grant, so nothing offered there can fail on tap, and it distinguishes accepted from waiting for that device to open the app. Also fixes the deprecated SF Symbol and the two Sendable warnings introduced with the contacts screen: the sections now talk to the model directly rather than storing view callbacks that a Binding setter has to convert.
This commit is contained in:
@@ -136,6 +136,16 @@ final class FakeCoreGateway: CoreGateway {
|
||||
sentToContacts.append(endpointId)
|
||||
return sendToContactResult
|
||||
}
|
||||
private(set) var offeredTransfers: [(transferId: UInt64, endpointId: String)] = []
|
||||
var offerTransferResult: Result<ContactSendOutcome, Error> = .failure(TestError.unimplemented)
|
||||
|
||||
func offerTransferToContact(
|
||||
transferId: UInt64,
|
||||
endpointId: String
|
||||
) async -> Result<ContactSendOutcome, Error> {
|
||||
offeredTransfers.append((transferId, endpointId))
|
||||
return offerTransferResult
|
||||
}
|
||||
func heldOffers() async -> Result<[HeldOfferModel], Error> { heldOffersResult }
|
||||
func pollContactsForOffers() async -> Result<UInt64, Error> {
|
||||
pollCount += 1
|
||||
|
||||
Reference in New Issue
Block a user