Swiftgram/TelegramUI/ChatHistoryLocation.swift
2019-02-17 02:55:21 +04:00

20 lines
680 B
Swift

import Postbox
import Display
enum ChatHistoryInitialSearchLocation: Equatable {
case index(MessageIndex)
case id(MessageId)
}
struct ChatHistoryLocationInput: Equatable {
let content: ChatHistoryLocation
let id: Int32
}
enum ChatHistoryLocation: Equatable {
case Initial(count: Int)
case InitialSearch(location: ChatHistoryInitialSearchLocation, count: Int)
case Navigation(index: MessageHistoryAnchorIndex, anchorIndex: MessageHistoryAnchorIndex, count: Int)
case Scroll(index: MessageHistoryAnchorIndex, anchorIndex: MessageHistoryAnchorIndex, sourceIndex: MessageHistoryAnchorIndex, scrollPosition: ListViewScrollPosition, animated: Bool)
}