mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Add debug logs
This commit is contained in:
parent
0a305bc848
commit
ce40309c54
@ -657,6 +657,7 @@ public extension TelegramEngine {
|
||||
}
|
||||
|
||||
public func getNextUnreadChannel(peerId: PeerId, chatListFilterId: Int32?, getFilterPredicate: @escaping (ChatListFilterData) -> ChatListFilterPredicate) -> Signal<(peer: EnginePeer, unreadCount: Int, location: NextUnreadChannelLocation)?, NoError> {
|
||||
let startTime = CFAbsoluteTimeGetCurrent()
|
||||
return self.account.postbox.transaction { transaction -> (peer: EnginePeer, unreadCount: Int, location: NextUnreadChannelLocation)? in
|
||||
func getForFilter(predicate: ChatListFilterPredicate?, isArchived: Bool) -> (peer: EnginePeer, unreadCount: Int)? {
|
||||
let additionalFilter: (Peer) -> Bool = { peer in
|
||||
@ -756,6 +757,12 @@ public extension TelegramEngine {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|> beforeNext { _ in
|
||||
let delayTime = CFAbsoluteTimeGetCurrent() - startTime
|
||||
if delayTime > 0.3 {
|
||||
Logger.shared.log("getNextUnreadChannel", "took \(delayTime) s")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public func getOpaqueChatInterfaceState(peerId: PeerId, threadId: Int64?) -> Signal<OpaqueChatInterfaceState?, NoError> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user