This commit is contained in:
Ali
2020-02-20 18:08:36 +04:00
parent a75bd17b6c
commit f57d6b6168
8323 changed files with 4359 additions and 56254 deletions

View File

@@ -0,0 +1,31 @@
import Foundation
import UIKit
import AsyncDisplayKit
import Postbox
import SwiftSignalKit
import Display
public enum ChatHistoryNodeHistoryState: Equatable {
case loading
case loaded(isEmpty: Bool)
}
public enum ChatHistoryNodeLoadState {
case loading
case empty
case messages
}
public protocol ChatHistoryNode: class {
var historyState: ValuePromise<ChatHistoryNodeHistoryState> { get }
var preloadPages: Bool { get set }
var loadState: ChatHistoryNodeLoadState? { get }
func setLoadStateUpdated(_ f: @escaping (ChatHistoryNodeLoadState, Bool) -> Void)
func messageInCurrentHistoryView(_ id: MessageId) -> Message?
func updateLayout(transition: ContainedViewLayoutTransition, updateSizeAndInsets: ListViewUpdateSizeAndInsets)
func forEachItemNode(_ f: (ASDisplayNode) -> Void)
func disconnect()
func scrollToEndOfHistory()
}