Another feed experiment

This commit is contained in:
Ali
2022-03-18 22:55:06 +04:00
parent fe0311b1e9
commit a9c595a640
128 changed files with 3524 additions and 957 deletions

View File

@@ -305,15 +305,15 @@ private func extractAdditionalData(view: MessageHistoryView, chatLocation: ChatL
cachedDataMessages[message.id] = message
}
case let .totalUnreadState(totalUnreadState):
switch chatLocation {
case let .peer(peerId):
if let combinedReadStates = view.fixedReadStates {
if case let .peer(readStates) = combinedReadStates, let readState = readStates[peerId] {
readStateData[peerId] = ChatHistoryCombinedInitialReadStateData(unreadCount: readState.count, totalState: totalUnreadState, notificationSettings: notificationSettings)
}
}
case .replyThread:
break
switch chatLocation {
case let .peer(peerId):
if let combinedReadStates = view.fixedReadStates {
if case let .peer(readStates) = combinedReadStates, let readState = readStates[peerId] {
readStateData[peerId] = ChatHistoryCombinedInitialReadStateData(unreadCount: readState.count, totalState: totalUnreadState, notificationSettings: notificationSettings)
}
}
case .replyThread, .feed:
break
}
default:
break
@@ -383,7 +383,7 @@ func fetchAndPreloadReplyThreadInfo(context: AccountContext, subject: ReplyThrea
let preloadSignal = preloadedChatHistoryViewForLocation(
input,
context: context,
chatLocation: .replyThread(replyThreadMessage),
chatLocation: .replyThread(message: replyThreadMessage),
subject: nil,
chatLocationContextHolder: chatLocationContextHolder,
fixedCombinedReadStates: nil,