mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Updated the onboarding to attempt to retrieve the current user profile config and skip display name collection if it already exists Updated the logic to get the snode pool and build paths immediately on launch even if the user hasn't been created yet (faster onboarding) Removed the iOS-specific concurrent dual snode '/store' behaviour Cleaned up the profile updating logic Fixed an issue where the pollers could end up deadlocking the main thread if too many tried to start concurrently
24 lines
858 B
Swift
24 lines
858 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public enum ProfileManagerError: LocalizedError {
|
|
case avatarImageTooLarge
|
|
case avatarWriteFailed
|
|
case avatarEncryptionFailed
|
|
case avatarUploadFailed
|
|
case avatarUploadMaxFileSizeExceeded
|
|
case invalidCall
|
|
|
|
var localizedDescription: String {
|
|
switch self {
|
|
case .avatarImageTooLarge: return "Avatar image too large."
|
|
case .avatarWriteFailed: return "Avatar write failed."
|
|
case .avatarEncryptionFailed: return "Avatar encryption failed."
|
|
case .avatarUploadFailed: return "Avatar upload failed."
|
|
case .avatarUploadMaxFileSizeExceeded: return "Maximum file size exceeded."
|
|
case .invalidCall: return "Attempted to remove avatar using the wrong method."
|
|
}
|
|
}
|
|
}
|