mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Temp
This commit is contained in:
31
submodules/TelegramUI/Sources/ChatHistoryNode.swift
Normal file
31
submodules/TelegramUI/Sources/ChatHistoryNode.swift
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user