no message

This commit is contained in:
Peter
2017-09-26 03:01:24 +03:00
parent 266d87d1e7
commit 46295401ff
215 changed files with 8023 additions and 2327 deletions

View File

@@ -292,8 +292,8 @@ public class ChatListController: TelegramController, UIViewControllerPreviewingD
private func deactivateSearch(animated: Bool) {
if !self.displayNavigationBar {
self.chatListDisplayNode.deactivateSearch(animated: animated)
self.setDisplayNavigationBar(true, transition: animated ? .animated(duration: 0.5, curve: .spring) : .immediate)
self.chatListDisplayNode.deactivateSearch(animated: animated)
}
}
@@ -312,6 +312,13 @@ public class ChatListController: TelegramController, UIViewControllerPreviewingD
}
let chatController = ChatController(account: self.account, peerId: peerId)
chatController.peekActions = .remove({ [weak self] in
if let strongSelf = self {
let _ = removeRecentPeer(account: strongSelf.account, peerId: peerId).start()
let searchContainer = strongSelf.chatListDisplayNode.searchDisplayController?.contentNode as? ChatListSearchContainerNode
searchContainer?.removePeerFromTopPeers(peerId)
}
})
chatController.canReadHistory.set(false)
chatController.containerLayoutUpdated(ContainerViewLayout(size: CGSize(width: self.view.bounds.size.width, height: self.view.bounds.size.height - (self.view.bounds.size.height > self.view.bounds.size.width ? 50.0 : 10.0)), metrics: LayoutMetrics(), intrinsicInsets: UIEdgeInsets(), statusBarHeight: nil, inputHeight: nil), transition: .immediate)
return chatController