Files
Morgan Pretty b33524ac21 Merge remote-tracking branch 'upstream/dev' into feature/simplify-migrations
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionUtilitiesKit/Configuration.swift
2025-09-15 12:17:22 +10:00

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)
]
)
}
}