mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-07 19:29:57 +02:00
feat(apple): collect transfers held for this device
Adds the opt-in foreground check and an explicit Check now, the waiting-to- be-delivered list on the sender side, and honest reporting when a send could not be delivered: a closed app is a delay, not a success nobody received. The setting is off by default and its footer states that checking reveals app-open times to remembered devices, since that is the reason it is a setting at all. Records in the design doc that this shipped as one global toggle rather than the per-contact opt-in originally specified.
This commit is contained in:
@@ -269,6 +269,27 @@ struct IncomingOfferModel: Equatable, Identifiable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
/// A transfer waiting for its target device to come back online.
|
||||
struct HeldOfferModel: Equatable, Identifiable, Sendable {
|
||||
let offerId: String
|
||||
let endpointId: String
|
||||
let transferId: UInt64
|
||||
let transferName: String
|
||||
let fileCount: UInt64
|
||||
let totalBytes: UInt64
|
||||
let createdAt: Int64
|
||||
|
||||
var id: String { offerId }
|
||||
}
|
||||
|
||||
/// Outcome of sending straight to a remembered device.
|
||||
struct ContactSendOutcome: Equatable, Sendable {
|
||||
let share: Share
|
||||
/// False when the device was not running: the transfer is held locally and
|
||||
/// collected the next time that device opens the app.
|
||||
let delivered: Bool
|
||||
}
|
||||
|
||||
/// How long a remembered device stays reachable while unused. The countdown
|
||||
/// restarts on every transfer.
|
||||
enum GrantLifetimeOption: String, CaseIterable, Identifiable, Sendable {
|
||||
|
||||
Reference in New Issue
Block a user