Initial holes 2.0 support

This commit is contained in:
Peter 2019-03-08 10:18:20 +00:00
parent a95da7736f
commit 4be6d0bfbb
24 changed files with 130 additions and 177 deletions

View File

@ -12,7 +12,6 @@ struct CallListNodeView {
enum CallListNodeViewTransitionReason { enum CallListNodeViewTransitionReason {
case initial case initial
case interactiveChanges case interactiveChanges
case holeChanges(filledHoleDirections: [MessageIndex: HoleFillDirection], removeHoleDirections: [MessageIndex: HoleFillDirection])
case reload case reload
case reloadAnimated case reloadAnimated
} }
@ -90,32 +89,6 @@ func preparedCallListNodeViewTransition(from fromView: CallListNodeView?, to toV
let _ = options.insert(.LowLatency) let _ = options.insert(.LowLatency)
let _ = options.insert(.Synchronous) let _ = options.insert(.Synchronous)
let _ = options.insert(.AnimateCrossfade) let _ = options.insert(.AnimateCrossfade)
case let .holeChanges(filledHoleDirections, removeHoleDirections):
if let (_, removeDirection) = removeHoleDirections.first {
switch removeDirection {
case .LowerToUpper:
var holeIndex: MessageIndex?
for (index, _) in filledHoleDirections {
if holeIndex == nil || index < holeIndex! {
holeIndex = index
}
}
if let holeIndex = holeIndex {
for i in 0 ..< toView.filteredEntries.count {
if toView.filteredEntries[i].index >= holeIndex {
let index = toView.filteredEntries.count - 1 - (i - 1)
stationaryItemRange = (index, Int.max)
break
}
}
}
case .UpperToLower:
break
case .AroundId, .AroundIndex:
break
}
}
} }
for (index, entry, previousIndex) in indicesAndItems { for (index, entry, previousIndex) in indicesAndItems {

View File

@ -29,7 +29,7 @@ public final class ChatControllerOverlayPresentationData {
private enum ChatLocationInfoData { private enum ChatLocationInfoData {
case peer(Promise<PeerView>) case peer(Promise<PeerView>)
case group(Promise<ChatListTopPeersView>) //case group(Promise<ChatListTopPeersView>)
} }
private enum ChatRecordingActivity { private enum ChatRecordingActivity {
@ -237,9 +237,9 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
case let .peer(peerId): case let .peer(peerId):
locationBroadcastPanelSource = .peer(peerId) locationBroadcastPanelSource = .peer(peerId)
self.chatLocationInfoData = .peer(Promise()) self.chatLocationInfoData = .peer(Promise())
case .group: /*case .group:
locationBroadcastPanelSource = .none locationBroadcastPanelSource = .none
self.chatLocationInfoData = .group(Promise()) self.chatLocationInfoData = .group(Promise())*/
} }
self.presentationData = context.sharedContext.currentPresentationData.with { $0 } self.presentationData = context.sharedContext.currentPresentationData.with { $0 }
@ -682,8 +682,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
if (peerId.namespace == Namespaces.Peer.CloudChannel || peerId.namespace == Namespaces.Peer.CloudGroup) { if (peerId.namespace == Namespaces.Peer.CloudChannel || peerId.namespace == Namespaces.Peer.CloudGroup) {
postAsReply = true postAsReply = true
} }
case .group: /*case .group:
postAsReply = true postAsReply = true*/
} }
} }
@ -1200,8 +1200,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
let avatarNode = ChatAvatarNavigationNode() let avatarNode = ChatAvatarNavigationNode()
avatarNode.chatController = self avatarNode.chatController = self
chatInfoButtonItem = UIBarButtonItem(customDisplayNode: avatarNode)! chatInfoButtonItem = UIBarButtonItem(customDisplayNode: avatarNode)!
case .group: /*case .group:
chatInfoButtonItem = UIBarButtonItem(customDisplayNode: ChatMultipleAvatarsNavigationNode())! chatInfoButtonItem = UIBarButtonItem(customDisplayNode: ChatMultipleAvatarsNavigationNode())!*/
} }
chatInfoButtonItem.target = self chatInfoButtonItem.target = self
chatInfoButtonItem.action = #selector(self.rightNavigationButtonAction) chatInfoButtonItem.action = #selector(self.rightNavigationButtonAction)
@ -1337,7 +1337,7 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
} }
})) }))
} }
case let .group(groupId): /*case let .group(groupId):
if case let .group(topPeersView) = self.chatLocationInfoData { if case let .group(topPeersView) = self.chatLocationInfoData {
let key: PostboxViewKey = .chatListTopPeers(groupId: groupId) let key: PostboxViewKey = .chatListTopPeers(groupId: groupId)
topPeersView.set(context.account.postbox.combinedView(keys: [key]) topPeersView.set(context.account.postbox.combinedView(keys: [key])
@ -1359,7 +1359,7 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
} }
} }
})) }))
} }*/
} }
self.botCallbackAlertMessageDisposable = (self.botCallbackAlertMessage.get() self.botCallbackAlertMessageDisposable = (self.botCallbackAlertMessage.get()
@ -2406,8 +2406,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
switch strongSelf.chatLocation { switch strongSelf.chatLocation {
case .peer: case .peer:
strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex), forceInCurrentChat: true) strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex), forceInCurrentChat: true)
case .group: /*case .group:
strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex)) strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex))*/
} }
} }
} }
@ -2899,9 +2899,9 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
strongSelf.chatDisplayNode.historyNode.scrollToNextMessage() strongSelf.chatDisplayNode.historyNode.scrollToNextMessage()
} }
}, openGrouping: { [weak self] in }, openGrouping: { [weak self] in
if let strongSelf = self, case let .group(groupId) = strongSelf.chatLocation { /*if let strongSelf = self, case let .group(groupId) = strongSelf.chatLocation {
(strongSelf.navigationController as? NavigationController)?.pushViewController(FeedGroupingController(context: strongSelf.context, groupId: groupId)) (strongSelf.navigationController as? NavigationController)?.pushViewController(FeedGroupingController(context: strongSelf.context, groupId: groupId))
} }*/
}, toggleSilentPost: { [weak self] in }, toggleSilentPost: { [weak self] in
if let strongSelf = self { if let strongSelf = self {
var value: Bool = false var value: Bool = false
@ -3149,7 +3149,7 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
strongSelf.present(standardTextAlertController(theme: AlertControllerTheme(presentationTheme: strongSelf.presentationData.theme), title: nil, text: text, actions: actions), in: .window(.root)) strongSelf.present(standardTextAlertController(theme: AlertControllerTheme(presentationTheme: strongSelf.presentationData.theme), title: nil, text: text, actions: actions), in: .window(.root))
} }
})) }))
case let .group(groupId): /*case let .group(groupId):
let unreadCountsKey: PostboxViewKey = .unreadCounts(items: [.group(groupId), .total(nil)]) let unreadCountsKey: PostboxViewKey = .unreadCounts(items: [.group(groupId), .total(nil)])
self.chatUnreadCountDisposable = (self.context.account.postbox.combinedView(keys: [unreadCountsKey]) |> deliverOnMainQueue).start(next: { [weak self] views in self.chatUnreadCountDisposable = (self.context.account.postbox.combinedView(keys: [unreadCountsKey]) |> deliverOnMainQueue).start(next: { [weak self] views in
if let strongSelf = self { if let strongSelf = self {
@ -3169,7 +3169,7 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
strongSelf.chatDisplayNode.navigateButtons.unreadCount = unreadCount strongSelf.chatDisplayNode.navigateButtons.unreadCount = unreadCount
} }
}) })*/
} }
self.interfaceInteraction = interfaceInteraction self.interfaceInteraction = interfaceInteraction
@ -3834,10 +3834,10 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
} }
} }
})) }))
case .group: /*case .group:
if case let .group(groupId) = self.chatLocation { if case let .group(groupId) = self.chatLocation {
(self.navigationController as? NavigationController)?.pushViewController(ChatListController(context: self.context, groupId: groupId, controlsHistoryPreload: false)) (self.navigationController as? NavigationController)?.pushViewController(ChatListController(context: self.context, groupId: groupId, controlsHistoryPreload: false))
} }*/
} }
case .search: case .search:
self.interfaceInteraction?.beginMessageSearch(.everything, "") self.interfaceInteraction?.beginMessageSearch(.everything, "")
@ -4705,8 +4705,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
switch self.chatLocation { switch self.chatLocation {
case let .peer(peerId): case let .peer(peerId):
derivedSearchState = ChatSearchState(query: search.query, location: .peer(peerId: peerId, fromId: nil, tags: nil), loadMoreState: loadMoreStateFromResultsState(search.resultsState)) derivedSearchState = ChatSearchState(query: search.query, location: .peer(peerId: peerId, fromId: nil, tags: nil), loadMoreState: loadMoreStateFromResultsState(search.resultsState))
case let .group(groupId): /*case let .group(groupId):
derivedSearchState = ChatSearchState(query: search.query, location: .group(groupId), loadMoreState: loadMoreStateFromResultsState(search.resultsState)) derivedSearchState = ChatSearchState(query: search.query, location: .group(groupId), loadMoreState: loadMoreStateFromResultsState(search.resultsState))*/
} }
case .members: case .members:
derivedSearchState = nil derivedSearchState = nil
@ -4714,8 +4714,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
switch self.chatLocation { switch self.chatLocation {
case let .peer(peerId): case let .peer(peerId):
derivedSearchState = ChatSearchState(query: search.query, location: .peer(peerId: peerId, fromId: peer.id, tags: nil), loadMoreState: loadMoreStateFromResultsState(search.resultsState)) derivedSearchState = ChatSearchState(query: search.query, location: .peer(peerId: peerId, fromId: peer.id, tags: nil), loadMoreState: loadMoreStateFromResultsState(search.resultsState))
case .group: /*case .group:
derivedSearchState = nil derivedSearchState = nil*/
} }
} }
} }
@ -4781,8 +4781,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
switch strongSelf.chatLocation { switch strongSelf.chatLocation {
case .peer: case .peer:
strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex), forceInCurrentChat: true) strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex), forceInCurrentChat: true)
case .group: /*case .group:
strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex)) strongSelf.navigateToMessage(from: nil, to: .index(navigateIndex))*/
} }
} }
strongSelf.updateItemNodesSearchTextHighlightStates() strongSelf.updateItemNodesSearchTextHighlightStates()
@ -5160,8 +5160,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
default: default:
break break
} }
case .group: /*case .group:
(self.navigationController as? NavigationController)?.pushViewController(ChatController(context: self.context, chatLocation: .peer(peerId), messageId: fromMessage?.id, botStart: nil)) (self.navigationController as? NavigationController)?.pushViewController(ChatController(context: self.context, chatLocation: .peer(peerId), messageId: fromMessage?.id, botStart: nil))*/
} }
} else { } else {
switch navigation { switch navigation {
@ -5649,8 +5649,8 @@ public final class ChatController: TelegramController, KeyShortcutResponder, Gal
switch chatLocation { switch chatLocation {
case let .peer(peerId): case let .peer(peerId):
let _ = data.swap(PreviewActionsData(notificationSettings: transaction.getPeerNotificationSettings(peerId), peer: transaction.getPeer(peerId))) let _ = data.swap(PreviewActionsData(notificationSettings: transaction.getPeerNotificationSettings(peerId), peer: transaction.getPeer(peerId)))
case .group: /*case .group:
let _ = data.swap(PreviewActionsData(notificationSettings: nil, peer: nil)) let _ = data.swap(PreviewActionsData(notificationSettings: nil, peer: nil))*/
} }
semaphore.signal() semaphore.signal()
}).start() }).start()

View File

@ -300,8 +300,8 @@ public final class ChatHistoryGridNode: GridNode, ChatHistoryNode {
reason = ChatHistoryViewTransitionReason.InteractiveChanges reason = ChatHistoryViewTransitionReason.InteractiveChanges
case .UpdateVisible: case .UpdateVisible:
reason = ChatHistoryViewTransitionReason.Reload reason = ChatHistoryViewTransitionReason.Reload
case let .FillHole(insertions, deletions): case .FillHole:
reason = ChatHistoryViewTransitionReason.HoleChanges(filledHoleDirections: insertions, removeHoleDirections: deletions) reason = ChatHistoryViewTransitionReason.Reload
} }
} }

View File

@ -69,8 +69,8 @@ struct ChatHistoryView {
enum ChatHistoryViewTransitionReason { enum ChatHistoryViewTransitionReason {
case Initial(fadeIn: Bool) case Initial(fadeIn: Bool)
case InteractiveChanges case InteractiveChanges
case HoleChanges(filledHoleDirections: [MessageIndex: HoleFillDirection], removeHoleDirections: [MessageIndex: HoleFillDirection])
case Reload case Reload
case HoleReload
} }
struct ChatHistoryViewTransitionInsertEntry { struct ChatHistoryViewTransitionInsertEntry {
@ -576,8 +576,9 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
reason = ChatHistoryViewTransitionReason.InteractiveChanges reason = ChatHistoryViewTransitionReason.InteractiveChanges
case .UpdateVisible: case .UpdateVisible:
reason = ChatHistoryViewTransitionReason.Reload reason = ChatHistoryViewTransitionReason.Reload
case let .FillHole(insertions, deletions): case .FillHole:
reason = ChatHistoryViewTransitionReason.HoleChanges(filledHoleDirections: insertions, removeHoleDirections: deletions) assertionFailure()
reason = ChatHistoryViewTransitionReason.Reload
} }
} }
} }
@ -614,10 +615,10 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
switch chatLocation { switch chatLocation {
case .peer: case .peer:
let _ = applyMaxReadIndexInteractively(postbox: context.account.postbox, stateManager: context.account.stateManager, index: messageIndex).start() let _ = applyMaxReadIndexInteractively(postbox: context.account.postbox, stateManager: context.account.stateManager, index: messageIndex).start()
case let .group(groupId): /*case let .group(groupId):
let _ = context.account.postbox.transaction({ transaction -> Void in let _ = context.account.postbox.transaction({ transaction -> Void in
transaction.applyGroupFeedInteractiveReadMaxIndex(groupId: groupId, index: messageIndex) transaction.applyGroupFeedInteractiveReadMaxIndex(groupId: groupId, index: messageIndex)
}).start() }).start()*/
} }
} }
} }

View File

@ -204,8 +204,8 @@ private func extractAdditionalData(view: MessageHistoryView, chatLocation: ChatL
readStateData[peerId] = ChatHistoryCombinedInitialReadStateData(unreadCount: readState.count, totalState: totalUnreadState, notificationSettings: notificationSettings) readStateData[peerId] = ChatHistoryCombinedInitialReadStateData(unreadCount: readState.count, totalState: totalUnreadState, notificationSettings: notificationSettings)
} }
} }
case .group: /*case .group:
break break*/
} }
default: default:
break break

View File

@ -155,8 +155,8 @@ final class ChatInfoTitlePanelNode: ChatTitleAccessoryPanelNode {
} else { } else {
updatedButtons = [] updatedButtons = []
} }
case .group: /*case .group:
updatedButtons = groupButtons() updatedButtons = groupButtons()*/
} }
var buttonsUpdated = false var buttonsUpdated = false

View File

@ -38,8 +38,8 @@ func canReplyInChat(_ chatPresentationInterfaceState: ChatPresentationInterfaceS
} else { } else {
canReply = true canReply = true
} }
case .group: /*case .group:
break break*/
} }
return canReply return canReply
} }
@ -223,8 +223,8 @@ func contextMenuForChatPresentationIntefaceState(chatPresentationInterfaceState:
canPin = true canPin = true
} }
} }
case .group: /*case .group:
break break*/
} }
} else { } else {
canReply = false canReply = false

View File

@ -57,7 +57,7 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
var displayInputTextPanel = false var displayInputTextPanel = false
if case .group = chatPresentationInterfaceState.chatLocation { /*if case .group = chatPresentationInterfaceState.chatLocation {
if chatPresentationInterfaceState.interfaceState.editMessage != nil { if chatPresentationInterfaceState.interfaceState.editMessage != nil {
displayInputTextPanel = true displayInputTextPanel = true
} else { } else {
@ -72,7 +72,7 @@ func inputPanelForChatPresentationIntefaceState(_ chatPresentationInterfaceState
return panel return panel
} }
} }
} }*/
if let peer = chatPresentationInterfaceState.renderedPeer?.peer { if let peer = chatPresentationInterfaceState.renderedPeer?.peer {
if let secretChat = peer as? TelegramSecretChat { if let secretChat = peer as? TelegramSecretChat {

View File

@ -505,7 +505,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
} }
} }
self.chatListDisplayNode.chatListNode.groupSelected = { [weak self] groupId in /*self.chatListDisplayNode.chatListNode.groupSelected = { [weak self] groupId in
if let strongSelf = self { if let strongSelf = self {
if let navigationController = strongSelf.navigationController as? NavigationController { if let navigationController = strongSelf.navigationController as? NavigationController {
var scrollToEndIfExists = false var scrollToEndIfExists = false
@ -522,7 +522,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
if let strongSelf = self { if let strongSelf = self {
let _ = updatePeerGroupIdInteractively(postbox: strongSelf.context.account.postbox, peerId: peerId, groupId: group ? Namespaces.PeerGroup.feed : nil).start() let _ = updatePeerGroupIdInteractively(postbox: strongSelf.context.account.postbox, peerId: peerId, groupId: group ? Namespaces.PeerGroup.feed : nil).start()
} }
} }*/
self.chatListDisplayNode.requestOpenMessageFromSearch = { [weak self] peer, messageId in self.chatListDisplayNode.requestOpenMessageFromSearch = { [weak self] peer, messageId in
if let strongSelf = self { if let strongSelf = self {
@ -973,10 +973,10 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
} else { } else {
return nil return nil
} }
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
let chatListController = ChatListController(context: self.context, groupId: groupId, controlsHistoryPreload: false) let chatListController = ChatListController(context: self.context, groupId: groupId, controlsHistoryPreload: false)
chatListController.containerLayoutUpdated(ContainerViewLayout(size: contentSize, metrics: LayoutMetrics(), intrinsicInsets: UIEdgeInsets(), safeInsets: UIEdgeInsets(), statusBarHeight: nil, inputHeight: nil, standardInputHeight: 216.0, inputHeightIsInteractivellyChanging: false, inVoiceOver: false), transition: .immediate) chatListController.containerLayoutUpdated(ContainerViewLayout(size: contentSize, metrics: LayoutMetrics(), intrinsicInsets: UIEdgeInsets(), safeInsets: UIEdgeInsets(), statusBarHeight: nil, inputHeight: nil, standardInputHeight: 216.0, inputHeightIsInteractivellyChanging: false, inVoiceOver: false), transition: .immediate)
return (chatListController, sourceRect) return (chatListController, sourceRect)*/
} }
} else { } else {
return nil return nil

View File

@ -8,14 +8,14 @@ import TelegramCore
enum ChatListItemContent { enum ChatListItemContent {
case peer(message: Message?, peer: RenderedPeer, combinedReadState: CombinedPeerReadState?, notificationSettings: PeerNotificationSettings?, summaryInfo: ChatListMessageTagSummaryInfo, embeddedState: PeerChatListEmbeddedInterfaceState?, inputActivities: [(Peer, PeerInputActivity)]?, isAd: Bool, ignoreUnreadBadge: Bool) case peer(message: Message?, peer: RenderedPeer, combinedReadState: CombinedPeerReadState?, notificationSettings: PeerNotificationSettings?, summaryInfo: ChatListMessageTagSummaryInfo, embeddedState: PeerChatListEmbeddedInterfaceState?, inputActivities: [(Peer, PeerInputActivity)]?, isAd: Bool, ignoreUnreadBadge: Bool)
case groupReference(groupId: PeerGroupId, message: Message?, topPeers: [Peer], counters: GroupReferenceUnreadCounters) //case groupReference(groupId: PeerGroupId, message: Message?, topPeers: [Peer], counters: GroupReferenceUnreadCounters)
var chatLocation: ChatLocation { var chatLocation: ChatLocation {
switch self { switch self {
case let .peer(_, peer, _, _, _, _, _, _, _): case let .peer(_, peer, _, _, _, _, _, _, _):
return .peer(peer.peerId) return .peer(peer.peerId)
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
return .group(groupId) return .group(groupId)*/
} }
} }
} }
@ -107,8 +107,8 @@ class ChatListItem: ListViewItem {
} else if let peer = peer.peers[peer.peerId] { } else if let peer = peer.peers[peer.peerId] {
self.interaction.peerSelected(peer) self.interaction.peerSelected(peer)
} }
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
self.interaction.groupSelected(groupId) self.interaction.groupSelected(groupId)*/
} }
} }
@ -275,8 +275,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
return nil return nil
} }
switch item.content { switch item.content {
case .groupReference: /*case .groupReference:
return nil return nil*/
case let .peer(peer): case let .peer(peer):
guard let chatMainPeer = peer.peer.chatMainPeer else { guard let chatMainPeer = peer.peer.chatMainPeer else {
return nil return nil
@ -293,8 +293,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
return nil return nil
} }
switch item.content { switch item.content {
case .groupReference: /*case .groupReference:
return nil return nil*/
case let .peer(peer): case let .peer(peer):
if let message = peer.message { if let message = peer.message {
var result = "" var result = ""
@ -402,8 +402,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
switch item.content { switch item.content {
case let .peer(_, peerValue, _, _, _, _, _, _, _): case let .peer(_, peerValue, _, _, _, _, _, _, _):
peer = peerValue.chatMainPeer peer = peerValue.chatMainPeer
case .groupReference: /*case .groupReference:
break break*/
} }
if let peer = peer { if let peer = peer {
@ -521,7 +521,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
inputActivities = inputActivitiesValue inputActivities = inputActivitiesValue
isPeerGroup = false isPeerGroup = false
isAd = isAdValue isAd = isAdValue
case let .groupReference(_, messageValue, topPeersValue, counters): /*case let .groupReference(_, messageValue, topPeersValue, counters):
if let messageValue = messageValue { if let messageValue = messageValue {
itemPeer = RenderedPeer(message: messageValue) itemPeer = RenderedPeer(message: messageValue)
} else { } else {
@ -543,7 +543,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
} else{ } else{
unreadCount = (0, false, false) unreadCount = (0, false, false)
} }
isAd = false isAd = false*/
} }
let theme = item.presentationData.theme.chatList let theme = item.presentationData.theme.chatList
@ -612,11 +612,11 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
} else { } else {
peerText = author.id == account.peerId ? item.presentationData.strings.DialogList_You : author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) peerText = author.id == account.peerId ? item.presentationData.strings.DialogList_You : author.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)
} }
} else if case .groupReference = item.content { }/* else if case .groupReference = item.content {
if let messagePeer = itemPeer.chatMainPeer { if let messagePeer = itemPeer.chatMainPeer {
peerText = messagePeer.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) peerText = messagePeer.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder)
} }
} }*/
if let peerText = peerText { if let peerText = peerText {
authorAttributedString = NSAttributedString(string: peerText, font: textFont, textColor: theme.authorNameColor) authorAttributedString = NSAttributedString(string: peerText, font: textFont, textColor: theme.authorNameColor)
@ -632,8 +632,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
} else if let displayTitle = peer?.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) { } else if let displayTitle = peer?.displayTitle(strings: item.presentationData.strings, displayOrder: item.presentationData.nameDisplayOrder) {
titleAttributedString = NSAttributedString(string: displayTitle, font: titleFont, textColor: item.index.messageIndex.id.peerId.namespace == Namespaces.Peer.SecretChat ? theme.secretTitleColor : theme.titleColor) titleAttributedString = NSAttributedString(string: displayTitle, font: titleFont, textColor: item.index.messageIndex.id.peerId.namespace == Namespaces.Peer.SecretChat ? theme.secretTitleColor : theme.titleColor)
} }
case .groupReference: /*case .groupReference:
titleAttributedString = NSAttributedString(string: "Feed", font: titleFont, textColor: theme.titleColor) titleAttributedString = NSAttributedString(string: "Feed", font: titleFont, textColor: theme.titleColor)*/
} }
textAttributedString = attributedText textAttributedString = attributedText
@ -807,7 +807,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
peerRevealOptions = [] peerRevealOptions = []
peerLeftRevealOptions = [] peerLeftRevealOptions = []
} }
case .groupReference: /*case .groupReference:
let isPinned = item.index.pinningIndex != nil let isPinned = item.index.pinningIndex != nil
if item.enableContextActions { if item.enableContextActions {
@ -815,7 +815,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
} else { } else {
peerRevealOptions = [] peerRevealOptions = []
} }
peerLeftRevealOptions = [] peerLeftRevealOptions = []*/
} }
return (layout, { [weak self] synchronousLoads, animated in return (layout, { [weak self] synchronousLoads, animated in
@ -1267,8 +1267,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
switch item.content { switch item.content {
case .peer: case .peer:
itemId = .peer(item.index.messageIndex.id.peerId) itemId = .peer(item.index.messageIndex.id.peerId)
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
itemId = .group(groupId) itemId = .group(groupId)*/
} }
item.interaction.setItemPinned(itemId, true) item.interaction.setItemPinned(itemId, true)
case RevealOptionKey.unpin.rawValue: case RevealOptionKey.unpin.rawValue:
@ -1276,8 +1276,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
switch item.content { switch item.content {
case .peer: case .peer:
itemId = .peer(item.index.messageIndex.id.peerId) itemId = .peer(item.index.messageIndex.id.peerId)
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
itemId = .group(groupId) itemId = .group(groupId)*/
} }
item.interaction.setItemPinned(itemId, false) item.interaction.setItemPinned(itemId, false)
case RevealOptionKey.mute.rawValue: case RevealOptionKey.mute.rawValue:

View File

@ -204,8 +204,8 @@ private func mappedInsertEntries(account: Account, nodeInteraction: ChatListNode
} }
case let .HoleEntry(_, theme): case let .HoleEntry(_, theme):
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint) return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint)
case let .GroupReferenceEntry(index, presentationData, groupId, message, topPeers, counters, editing): /*case let .GroupReferenceEntry(index, presentationData, groupId, message, topPeers, counters, editing):
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListItem(presentationData: presentationData, account: account, peerGroupId: peerGroupId, index: index, content: .groupReference(groupId: groupId, message: message, topPeers: topPeers, counters: counters), editing: editing, hasActiveRevealControls: false, selected: false, header: nil, enableContextActions: true, interaction: nodeInteraction), directionHint: entry.directionHint) return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListItem(presentationData: presentationData, account: account, peerGroupId: peerGroupId, index: index, content: .groupReference(groupId: groupId, message: message, topPeers: topPeers, counters: counters), editing: editing, hasActiveRevealControls: false, selected: false, header: nil, enableContextActions: true, interaction: nodeInteraction), directionHint: entry.directionHint)*/
} }
} }
} }
@ -241,8 +241,8 @@ private func mappedUpdateEntries(account: Account, nodeInteraction: ChatListNode
} }
case let .HoleEntry(_, theme): case let .HoleEntry(_, theme):
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint) return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListHoleItem(theme: theme), directionHint: entry.directionHint)
case let .GroupReferenceEntry(index, presentationData, groupId, message, topPeers, counters, editing): /*case let .GroupReferenceEntry(index, presentationData, groupId, message, topPeers, counters, editing):
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListItem(presentationData: presentationData, account: account, peerGroupId: peerGroupId, index: index, content: .groupReference(groupId: groupId, message: message, topPeers: topPeers, counters: counters), editing: editing, hasActiveRevealControls: false, selected: false, header: nil, enableContextActions: true, interaction: nodeInteraction), directionHint: entry.directionHint) return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ChatListItem(presentationData: presentationData, account: account, peerGroupId: peerGroupId, index: index, content: .groupReference(groupId: groupId, message: message, topPeers: topPeers, counters: counters), editing: editing, hasActiveRevealControls: false, selected: false, header: nil, enableContextActions: true, interaction: nodeInteraction), directionHint: entry.directionHint)*/
} }
} }
} }
@ -817,8 +817,8 @@ final class ChatListNode: ListView {
} else { } else {
referenceId = .peer(index.messageIndex.id.peerId) referenceId = .peer(index.messageIndex.id.peerId)
} }
case let .GroupReferenceEntry(_, _, groupId, _, _, _, _): /*case let .GroupReferenceEntry(_, _, groupId, _, _, _, _):
referenceId = .group(groupId) referenceId = .group(groupId)*/
default: default:
break break
} }
@ -831,8 +831,8 @@ final class ChatListNode: ListView {
switch fromEntry { switch fromEntry {
case let .PeerEntry(index, _, _, _, _, _, _, _, _, _, _, _, _): case let .PeerEntry(index, _, _, _, _, _, _, _, _, _, _, _, _):
itemId = .peer(index.messageIndex.id.peerId) itemId = .peer(index.messageIndex.id.peerId)
case let .GroupReferenceEntry(_, _, groupId, _, _, _, _): /*case let .GroupReferenceEntry(_, _, groupId, _, _, _, _):
itemId = .group(groupId) itemId = .group(groupId)*/
default: default:
break break
} }

View File

@ -45,7 +45,7 @@ enum ChatListNodeEntryId: Hashable {
enum ChatListNodeEntry: Comparable, Identifiable { enum ChatListNodeEntry: Comparable, Identifiable {
case PeerEntry(index: ChatListIndex, presentationData: ChatListPresentationData, message: Message?, readState: CombinedPeerReadState?, notificationSettings: PeerNotificationSettings?, embeddedInterfaceState: PeerChatListEmbeddedInterfaceState?, peer: RenderedPeer, summaryInfo: ChatListMessageTagSummaryInfo, editing: Bool, hasActiveRevealControls: Bool, selected: Bool, inputActivities: [(Peer, PeerInputActivity)]?, isAd: Bool) case PeerEntry(index: ChatListIndex, presentationData: ChatListPresentationData, message: Message?, readState: CombinedPeerReadState?, notificationSettings: PeerNotificationSettings?, embeddedInterfaceState: PeerChatListEmbeddedInterfaceState?, peer: RenderedPeer, summaryInfo: ChatListMessageTagSummaryInfo, editing: Bool, hasActiveRevealControls: Bool, selected: Bool, inputActivities: [(Peer, PeerInputActivity)]?, isAd: Bool)
case HoleEntry(ChatListHole, theme: PresentationTheme) case HoleEntry(ChatListHole, theme: PresentationTheme)
case GroupReferenceEntry(index: ChatListIndex, presentationData: ChatListPresentationData, groupId: PeerGroupId, message: Message?, topPeers: [Peer], counters: GroupReferenceUnreadCounters, editing: Bool) //case GroupReferenceEntry(index: ChatListIndex, presentationData: ChatListPresentationData, groupId: PeerGroupId, message: Message?, topPeers: [Peer], counters: GroupReferenceUnreadCounters, editing: Bool)
var index: ChatListIndex { var index: ChatListIndex {
switch self { switch self {
@ -53,8 +53,8 @@ enum ChatListNodeEntry: Comparable, Identifiable {
return index return index
case let .HoleEntry(hole, _): case let .HoleEntry(hole, _):
return ChatListIndex(pinningIndex: nil, messageIndex: hole.index) return ChatListIndex(pinningIndex: nil, messageIndex: hole.index)
case let .GroupReferenceEntry(index, _, _, _, _, _, _): /*case let .GroupReferenceEntry(index, _, _, _, _, _, _):
return index return index*/
} }
} }
@ -64,8 +64,8 @@ enum ChatListNodeEntry: Comparable, Identifiable {
return .PeerId(index.messageIndex.id.peerId.toInt64()) return .PeerId(index.messageIndex.id.peerId.toInt64())
case let .HoleEntry(hole, _): case let .HoleEntry(hole, _):
return .Hole(Int64(hole.index.id.id)) return .Hole(Int64(hole.index.id.id))
case let .GroupReferenceEntry(_, _, groupId, _, _, _, _): /*case let .GroupReferenceEntry(_, _, groupId, _, _, _, _):
return .GroupId(groupId) return .GroupId(groupId)*/
} }
} }
@ -149,7 +149,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
default: default:
return false return false
} }
case let .GroupReferenceEntry(lhsIndex, lhsPresentationData, lhsGroupId, lhsMessage, lhsTopPeers, lhsCounters, lhsEditing): /*case let .GroupReferenceEntry(lhsIndex, lhsPresentationData, lhsGroupId, lhsMessage, lhsTopPeers, lhsCounters, lhsEditing):
if case let .GroupReferenceEntry(rhsIndex, rhsPresentationData, rhsGroupId, rhsMessage, rhsTopPeers, rhsCounters, rhsEditing) = rhs { if case let .GroupReferenceEntry(rhsIndex, rhsPresentationData, rhsGroupId, rhsMessage, rhsTopPeers, rhsCounters, rhsEditing) = rhs {
if lhsIndex != rhsIndex { if lhsIndex != rhsIndex {
return false return false
@ -184,7 +184,7 @@ enum ChatListNodeEntry: Comparable, Identifiable {
return true return true
} else { } else {
return false return false
} }*/
} }
} }
} }
@ -222,10 +222,10 @@ func chatListNodeEntriesForView(_ view: ChatListView, state: ChatListNodeState,
result.append(.PeerEntry(index: offsetPinnedIndex(index, offset: pinnedIndexOffset), presentationData: state.presentationData, message: updatedMessage, readState: updatedCombinedReadState, notificationSettings: notificationSettings, embeddedInterfaceState: embeddedState, peer: peer, summaryInfo: summaryInfo, editing: state.editing, hasActiveRevealControls: index.messageIndex.id.peerId == state.peerIdWithRevealedOptions, selected: state.selectedPeerIds.contains(index.messageIndex.id.peerId), inputActivities: state.peerInputActivities?.activities[index.messageIndex.id.peerId], isAd: false)) result.append(.PeerEntry(index: offsetPinnedIndex(index, offset: pinnedIndexOffset), presentationData: state.presentationData, message: updatedMessage, readState: updatedCombinedReadState, notificationSettings: notificationSettings, embeddedInterfaceState: embeddedState, peer: peer, summaryInfo: summaryInfo, editing: state.editing, hasActiveRevealControls: index.messageIndex.id.peerId == state.peerIdWithRevealedOptions, selected: state.selectedPeerIds.contains(index.messageIndex.id.peerId), inputActivities: state.peerInputActivities?.activities[index.messageIndex.id.peerId], isAd: false))
case let .HoleEntry(hole): case let .HoleEntry(hole):
result.append(.HoleEntry(hole, theme: state.presentationData.theme)) result.append(.HoleEntry(hole, theme: state.presentationData.theme))
case let .GroupReferenceEntry(groupId, index, message, topPeers, counters): /*case let .GroupReferenceEntry(groupId, index, message, topPeers, counters):
if case .chatList = mode { if case .chatList = mode {
result.append(.GroupReferenceEntry(index: index, presentationData: state.presentationData, groupId: groupId, message: message, topPeers: topPeers, counters: counters, editing: state.editing)) result.append(.GroupReferenceEntry(index: index, presentationData: state.presentationData, groupId: groupId, message: message, topPeers: topPeers, counters: counters, editing: state.editing))
} }*/
} }
} }
if view.laterIndex == nil { if view.laterIndex == nil {

View File

@ -1177,8 +1177,8 @@ final class ChatListSearchContainerNode: SearchDisplayControllerContentNode {
switch item.content { switch item.content {
case let .peer(message, peer, _, _, _, _, _, _, _): case let .peer(message, peer, _, _, _, _, _, _, _):
return (selectedItemNode.view, bounds, message?.id ?? peer.peerId) return (selectedItemNode.view, bounds, message?.id ?? peer.peerId)
case let .groupReference(groupId, _, _, _): /*case let .groupReference(groupId, _, _, _):
return (selectedItemNode.view, bounds, groupId) return (selectedItemNode.view, bounds, groupId)*/
} }
} }
return nil return nil

View File

@ -13,7 +13,7 @@ struct ChatListNodeView {
enum ChatListNodeViewTransitionReason { enum ChatListNodeViewTransitionReason {
case initial case initial
case interactiveChanges case interactiveChanges
case holeChanges(filledHoleDirections: [MessageIndex: HoleFillDirection], removeHoleDirections: [MessageIndex: HoleFillDirection]) case holeChanges
case reload case reload
} }
@ -105,32 +105,8 @@ func preparedChatListNodeViewTransition(from fromView: ChatListNodeView?, to toV
} }
case .reload: case .reload:
break break
case let .holeChanges(filledHoleDirections, removeHoleDirections): case .holeChanges:
if let (_, removeDirection) = removeHoleDirections.first { break
switch removeDirection {
case .LowerToUpper:
var holeIndex: ChatListIndex?
for (index, _) in filledHoleDirections {
if holeIndex == nil || index < holeIndex!.messageIndex {
holeIndex = ChatListIndex(pinningIndex: nil, messageIndex: index)
}
}
if let holeIndex = holeIndex {
for i in 0 ..< toView.filteredEntries.count {
if toView.filteredEntries[i].index >= holeIndex {
let index = toView.filteredEntries.count - 1 - (i - 1)
stationaryItemRange = (index, Int.max)
break
}
}
}
case .UpperToLower:
break
case .AroundId, .AroundIndex:
break
}
}
} }
for (index, entry, previousIndex) in indicesAndItems { for (index, entry, previousIndex) in indicesAndItems {

View File

@ -189,23 +189,23 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
var hasAvatar = false var hasAvatar = false
switch item.chatLocation { switch item.chatLocation {
case let .peer(peerId): case let .peer(peerId):
if peerId != item.context.account.peerId { if peerId != item.context.account.peerId {
if peerId.isGroupOrChannel && item.message.author != nil { if peerId.isGroupOrChannel && item.message.author != nil {
var isBroadcastChannel = false var isBroadcastChannel = false
if let peer = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = peer.info { if let peer = item.message.peers[item.message.id.peerId] as? TelegramChannel, case .broadcast = peer.info {
isBroadcastChannel = true isBroadcastChannel = true
} }
if !isBroadcastChannel { if !isBroadcastChannel {
hasAvatar = true hasAvatar = true
}
} }
} else if incoming {
hasAvatar = true
} }
} else if incoming { /*case .group:
hasAvatar = true hasAvatar = true*/
}
case .group:
hasAvatar = true
} }
if hasAvatar { if hasAvatar {

View File

@ -360,10 +360,10 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
} else if incoming { } else if incoming {
hasAvatar = true hasAvatar = true
} }
case .group: /*case .group:
allowFullWidth = true allowFullWidth = true
hasAvatar = true hasAvatar = true
displayAuthorInfo = true displayAuthorInfo = true*/
} }
if let forwardInfo = item.content.firstMessage.forwardInfo, forwardInfo.source == nil, forwardInfo.author.id.namespace == Namespaces.Peer.CloudUser { if let forwardInfo = item.content.firstMessage.forwardInfo, forwardInfo.source == nil, forwardInfo.author.id.namespace == Namespaces.Peer.CloudUser {

View File

@ -119,8 +119,8 @@ class ChatMessageInstantVideoItemNode: ChatMessageItemView {
} else if incoming { } else if incoming {
hasAvatar = true hasAvatar = true
} }
case .group: /*case .group:
hasAvatar = true hasAvatar = true*/
} }
if hasAvatar { if hasAvatar {

View File

@ -276,9 +276,9 @@ public final class ChatMessageItem: ListViewItem, CustomStringConvertible {
effectiveAuthor = content.firstMessage.author effectiveAuthor = content.firstMessage.author
displayAuthorInfo = incoming && peerId.isGroupOrChannel && effectiveAuthor != nil displayAuthorInfo = incoming && peerId.isGroupOrChannel && effectiveAuthor != nil
} }
case .group: /*case .group:
effectiveAuthor = content.firstMessage.author effectiveAuthor = content.firstMessage.author
displayAuthorInfo = incoming && effectiveAuthor != nil displayAuthorInfo = incoming && effectiveAuthor != nil*/
} }
self.effectiveAuthorId = effectiveAuthor?.id self.effectiveAuthorId = effectiveAuthor?.id

View File

@ -144,8 +144,8 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
} else if incoming { } else if incoming {
hasAvatar = true hasAvatar = true
} }
case .group: /*case .group:
hasAvatar = true hasAvatar = true*/
} }
if hasAvatar { if hasAvatar {

View File

@ -66,7 +66,7 @@ private func filterOriginalMessageFlags(_ message: Message) -> Message {
private func filterMessageChannelPeer(_ peer: Peer) -> Peer { private func filterMessageChannelPeer(_ peer: Peer) -> Peer {
if let peer = peer as? TelegramChannel { if let peer = peer as? TelegramChannel {
return TelegramChannel(id: peer.id, accessHash: peer.accessHash, title: peer.title, username: peer.username, photo: peer.photo, creationDate: peer.creationDate, version: peer.version, participationStatus: peer.participationStatus, info: .group(TelegramChannelGroupInfo(flags: [])), flags: peer.flags, restrictionInfo: peer.restrictionInfo, adminRights: peer.adminRights, bannedRights: peer.bannedRights, defaultBannedRights: peer.defaultBannedRights, peerGroupId: peer.peerGroupId) return TelegramChannel(id: peer.id, accessHash: peer.accessHash, title: peer.title, username: peer.username, photo: peer.photo, creationDate: peer.creationDate, version: peer.version, participationStatus: peer.participationStatus, info: .group(TelegramChannelGroupInfo(flags: [])), flags: peer.flags, restrictionInfo: peer.restrictionInfo, adminRights: peer.adminRights, bannedRights: peer.bannedRights, defaultBannedRights: peer.defaultBannedRights)
} }
return peer return peer
} }

View File

@ -25,8 +25,8 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
switch chatLocation { switch chatLocation {
case .peer: case .peer:
placeholderText = strings.Conversation_SearchPlaceholder placeholderText = strings.Conversation_SearchPlaceholder
case .group: /*case .group:
placeholderText = "Search this feed" placeholderText = "Search this feed"*/
} }
self.searchBar.placeholderString = NSAttributedString(string: placeholderText, font: searchBarFont, textColor: theme.rootController.activeNavigationSearchBar.inputPlaceholderTextColor) self.searchBar.placeholderString = NSAttributedString(string: placeholderText, font: searchBarFont, textColor: theme.rootController.activeNavigationSearchBar.inputPlaceholderTextColor)
@ -77,8 +77,8 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode {
switch self.chatLocation { switch self.chatLocation {
case .peer: case .peer:
placeholderText = self.strings.Conversation_SearchPlaceholder placeholderText = self.strings.Conversation_SearchPlaceholder
case .group: /*case .group:
placeholderText = "Search this feed" placeholderText = "Search this feed"*/
} }
self.searchBar.placeholderString = NSAttributedString(string: placeholderText, font: searchBarFont, textColor: theme.rootController.activeNavigationSearchBar.inputPlaceholderTextColor) self.searchBar.placeholderString = NSAttributedString(string: placeholderText, font: searchBarFont, textColor: theme.rootController.activeNavigationSearchBar.inputPlaceholderTextColor)
case .members: case .members:

View File

@ -4,7 +4,7 @@ import TelegramCore
import Postbox import Postbox
import SwiftSignalKit import SwiftSignalKit
final class FeedGroupingController: ViewController { /*final class FeedGroupingController: ViewController {
private var controllerNode: FeedGroupingControllerNode { private var controllerNode: FeedGroupingControllerNode {
return self.displayNode as! FeedGroupingControllerNode return self.displayNode as! FeedGroupingControllerNode
} }
@ -51,3 +51,4 @@ final class FeedGroupingController: ViewController {
} }
} }
*/

View File

@ -6,7 +6,7 @@ import Display
import SafariServices import SafariServices
private enum FeedGroupingControllerTransitionType { /*private enum FeedGroupingControllerTransitionType {
case initial case initial
case initialLoad case initialLoad
case generic case generic
@ -483,3 +483,4 @@ final class FeedGroupingControllerNode: ViewControllerTracingNode {
} }
} }
*/

View File

@ -55,8 +55,9 @@ func preparedChatHistoryViewTransition(from fromView: ChatHistoryView?, to toVie
} }
case .Reload: case .Reload:
stationaryItemRange = (0, Int.max) stationaryItemRange = (0, Int.max)
case let .HoleChanges(filledHoleDirections, removeHoleDirections): case .HoleReload:
if let (_, removeDirection) = removeHoleDirections.first { stationaryItemRange = (0, Int.max)
/*if let (_, removeDirection) = removeHoleDirections.first {
switch removeDirection { switch removeDirection {
case .LowerToUpper: case .LowerToUpper:
var holeIndex: MessageIndex? var holeIndex: MessageIndex?
@ -80,7 +81,7 @@ func preparedChatHistoryViewTransition(from fromView: ChatHistoryView?, to toVie
case .AroundId, .AroundIndex: case .AroundId, .AroundIndex:
break break
} }
} }*/
} }
for (index, entry, previousIndex) in mergeResult.indicesAndItems { for (index, entry, previousIndex) in mergeResult.indicesAndItems {