Update submodules

This commit is contained in:
Peter 2018-12-19 18:29:33 +03:00
parent 5fe79a1e00
commit cf7ca661cf
4 changed files with 27 additions and 4 deletions

View File

@ -639,10 +639,33 @@ private enum QueuedWakeup: Int32 {
self.contextDisposable.set(self.context.get().start(next: { context in self.contextDisposable.set(self.context.get().start(next: { context in
assert(Queue.mainQueue().isCurrent()) assert(Queue.mainQueue().isCurrent())
Logger.shared.log("App \(self.episodeId)", "received context \(String(describing: context)) account \(String(describing: context?.accountId))") var network: Network?
if let context = context {
switch context {
case let .unauthorized(unauthorized):
network = unauthorized.account.network
case let .authorized(authorized):
network = authorized.account.network
default:
break
}
}
Logger.shared.log("App \(self.episodeId)", "received context \(String(describing: context)) account \(String(describing: context?.accountId)) network \(String(describing: network))")
if let contextValue = self.contextValue { if let contextValue = self.contextValue {
(contextValue.account?.applicationContext as? TelegramApplicationContext)?.isCurrent = false (contextValue.account?.applicationContext as? TelegramApplicationContext)?.isCurrent = false
switch contextValue {
case let .unauthorized(unauthorized):
unauthorized.account.shouldBeServiceTaskMaster.set(.single(.never))
case let .authorized(authorized):
authorized.account.shouldBeServiceTaskMaster.set(.single(.never))
authorized.account.shouldKeepOnlinePresence.set(.single(false))
authorized.account.shouldExplicitelyKeepWorkerConnections.set(.single(false))
authorized.account.shouldKeepBackgroundDownloadConnections.set(.single(false))
default:
break
}
} }
self.contextValue = context self.contextValue = context
if let context = context { if let context = context {

@ -1 +1 @@
Subproject commit 94aadbb5b721763afb1f15b60f38e7624c625588 Subproject commit 834e3a865deb0bad47c54094792044aef450c910

@ -1 +1 @@
Subproject commit ac166d7b6106fa9e0400d7175d38cc679b6c4f31 Subproject commit 99e75d0f2dc4f76deff6689ff9dd6b848b8312e9

@ -1 +1 @@
Subproject commit ea4b62939b3390f98c24cabeef42956d02a4e706 Subproject commit 3302f0ab4fe7497c79b43befe665efd3e3e5cb40