mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix build [skip ci]
This commit is contained in:
@@ -4,22 +4,23 @@ import Postbox
|
||||
import TelegramApi
|
||||
import MtProtoKit
|
||||
|
||||
public struct NotificationSoundSettings : Equatable {
|
||||
public struct NotificationSoundSettings: Equatable {
|
||||
public private(set) var maxDuration: Int = 5
|
||||
public private(set) var maxSize: Int = 102400
|
||||
public private(set) var maxSavedCount: Int = 100
|
||||
|
||||
private init(appConfiguration: AppConfiguration) {
|
||||
var reasons: [String] = []
|
||||
if let data = appConfiguration.data {
|
||||
let duration = data["ringtone_duration_max"] as? Double ?? 5
|
||||
let size = data["ringtone_size_max"] as? Double ?? 102400
|
||||
let count = data["ringtone_saved_count_max"] as? Double ?? 100
|
||||
|
||||
self.maxDuration = Int(duration) ?? 5
|
||||
self.maxSize = Int(size) ?? 102400
|
||||
self.maxSavedCount = Int(count) ?? 100
|
||||
self.maxDuration = Int(duration)
|
||||
self.maxSize = Int(size)
|
||||
self.maxSavedCount = Int(count)
|
||||
}
|
||||
}
|
||||
|
||||
public static func extract(from appConfiguration: AppConfiguration) -> NotificationSoundSettings {
|
||||
return self.init(appConfiguration: appConfiguration)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user