Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

25 lines
678 B
Swift

import Foundation
/// The observable state of one pre-upload.
///
/// `Value` is whatever the producer eventually yields — in this project, a cloud `Media`.
/// The registry itself never inspects it.
public enum PreuploadState<Value> {
case progress(Float)
case done(Value)
case failed
}
public extension PreuploadState {
/// `.progress` is the only non-terminal state. The registry relies on this to know when a
/// context has finished and when a `join` subscriber may be completed.
var isTerminal: Bool {
switch self {
case .progress:
return false
case .done, .failed:
return true
}
}
}