From b7900da12ab55823e2e5f3a8092136661da86dc3 Mon Sep 17 00:00:00 2001 From: overtake Date: Sun, 5 Mar 2017 13:10:01 +0300 Subject: [PATCH 1/2] enable logging --- TelegramCore/NetworkLogging.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TelegramCore/NetworkLogging.m b/TelegramCore/NetworkLogging.m index a838c0c239..bc562f3ca3 100644 --- a/TelegramCore/NetworkLogging.m +++ b/TelegramCore/NetworkLogging.m @@ -16,7 +16,7 @@ void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) { #if TARGET_IPHONE_SIMULATOR static bool loggingEnabled = true; #elif defined(DEBUG) -static bool loggingEnabled = false; +static bool loggingEnabled = true; #else static bool loggingEnabled = true; #endif From faa3d0317deee578665860a1c667c62eaaadc91b Mon Sep 17 00:00:00 2001 From: overtake Date: Sun, 5 Mar 2017 16:26:28 +0300 Subject: [PATCH 2/2] - importAccount small changes --- TelegramCore/ImportAccount.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TelegramCore/ImportAccount.swift b/TelegramCore/ImportAccount.swift index 6757a08553..8d8c25373e 100644 --- a/TelegramCore/ImportAccount.swift +++ b/TelegramCore/ImportAccount.swift @@ -11,9 +11,15 @@ public struct ImportAccountProvider { let mtProtoKeychain: () -> Signal<[String: [String: Data]], NoError> let accountState: () -> Signal let peers: () -> Signal<[Peer], NoError> + + public init(mtProtoKeychain: @escaping () -> Signal<[String: [String: Data]], NoError>, accountState: @escaping() -> Signal, peers: @escaping() -> Signal<[Peer], NoError>) { + self.mtProtoKeychain = mtProtoKeychain + self.accountState = accountState + self.peers = peers + } } -public func importAccount(account: Account, provider: ImportAccountProvider) -> Signal { +public func importAccount(account: UnauthorizedAccount, provider: ImportAccountProvider) -> Signal { return provider.mtProtoKeychain() |> mapToSignal { keychain -> Signal in for (group, dict) in keychain {