mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Removed some more legacy code Added back logic similar to the pre-processing de-duping logic (was resulting in "unsent" messages reappearing) Added a number of updated view files
22 lines
677 B
Swift
22 lines
677 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public enum AttachmentError: LocalizedError {
|
|
case invalidStartState
|
|
case noAttachment
|
|
case notUploaded
|
|
case invalidData
|
|
case encryptionFailed
|
|
|
|
public var errorDescription: String? {
|
|
switch self {
|
|
case .invalidStartState: return "Cannot upload an attachment in this state."
|
|
case .noAttachment: return "No such attachment."
|
|
case .notUploaded: return "Attachment not uploaded."
|
|
case .invalidData: return "Invalid attachment data."
|
|
case .encryptionFailed: return "Couldn't encrypt file."
|
|
}
|
|
}
|
|
}
|