mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
ba6cc80b60
1 changed files with 2 additions and 2 deletions
|
|
@ -323,11 +323,11 @@ func networkUsageStats(basePath: String, reset: ResetNetworkUsageStats) -> Signa
|
|||
var resetAddKeys: [NSNumber: NSNumber] = [:]
|
||||
let timestamp = Int32(CFAbsoluteTimeGetCurrent() + NSTimeIntervalSince1970)
|
||||
if reset.contains(.wifi) {
|
||||
resetKeys = rawKeys.filter({ $0.connection == .wifi }).map({ $0.key as NSNumber })
|
||||
resetKeys += rawKeys.filter({ $0.connection == .wifi }).map({ $0.key as NSNumber })
|
||||
resetAddKeys[UsageCalculationResetKey.wifi.rawValue as NSNumber] = Int64(timestamp) as NSNumber
|
||||
}
|
||||
if reset.contains(.cellular) {
|
||||
resetKeys = rawKeys.filter({ $0.connection == .cellular }).map({ $0.key as NSNumber })
|
||||
resetKeys += rawKeys.filter({ $0.connection == .cellular }).map({ $0.key as NSNumber })
|
||||
resetAddKeys[UsageCalculationResetKey.cellular.rawValue as NSNumber] = Int64(timestamp) as NSNumber
|
||||
}
|
||||
if !resetKeys.isEmpty {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue