Swiftgram/TelegramUI/ChatHistoryLocation.swift
2019-06-06 17:43:48 +01:00

21 lines
693 B
Swift

import Postbox
import UIKit
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)
}