mirror of
https://github.com/lux-tel/session-ios.git
synced 2026-10-30 20:38:32 +00:00
# Conflicts: # Session.xcodeproj/project.pbxproj # SessionUtilitiesKit/Configuration.swift
30 lines
1003 B
Swift
30 lines
1003 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public enum SNUtilitiesKit {
|
|
public private(set) static var maxFileSize: UInt = 0
|
|
public private(set) static var maxValidImageDimension: Int = 0
|
|
|
|
public static var isRunningTests: Bool {
|
|
ProcessInfo.processInfo.environment["XCTestConfigurationFilePath"] != nil // stringlint:ignore
|
|
}
|
|
|
|
public static func configure(
|
|
networkMaxFileSize: UInt,
|
|
maxValidImageDimention: Int,
|
|
using dependencies: Dependencies
|
|
) {
|
|
self.maxFileSize = networkMaxFileSize
|
|
self.maxValidImageDimension = maxValidImageDimention
|
|
|
|
// Register any recurring jobs to ensure they are actually scheduled
|
|
dependencies[singleton: .jobRunner].registerRecurringJobs(
|
|
scheduleInfo: [
|
|
(.syncPushTokens, .recurringOnLaunch, false, false),
|
|
(.syncPushTokens, .recurringOnActive, false, true)
|
|
]
|
|
)
|
|
}
|
|
}
|