mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Fix loading foreign channels
This commit is contained in:
@@ -93,13 +93,15 @@ func chatHistoryViewForLocation(_ location: ChatHistoryLocationInput, context: A
|
||||
let (cachedData, cachedDataMessages, readStateData) = extractAdditionalData(view: view, chatLocation: chatLocation)
|
||||
|
||||
let combinedInitialData = ChatHistoryCombinedInitialData(initialData: initialData, buttonKeyboardMessage: view.topTaggedMessages.first, cachedData: cachedData, cachedDataMessages: cachedDataMessages, readStateData: readStateData)
|
||||
|
||||
if view.isLoading {
|
||||
preloaded = false
|
||||
return .Loading(initialData: combinedInitialData, type: .Generic(type: updateType))
|
||||
}
|
||||
|
||||
if preloaded {
|
||||
return .HistoryView(view: view, type: .Generic(type: updateType), scrollPosition: nil, flashIndicators: false, originalScrollPosition: nil, initialData: combinedInitialData, id: location.id)
|
||||
} else {
|
||||
if view.isLoading {
|
||||
return .Loading(initialData: combinedInitialData, type: .Generic(type: updateType))
|
||||
}
|
||||
var scrollPosition: ChatHistoryViewScrollPosition?
|
||||
|
||||
let canScrollToRead: Bool
|
||||
@@ -179,6 +181,11 @@ func chatHistoryViewForLocation(_ location: ChatHistoryLocationInput, context: A
|
||||
let (cachedData, cachedDataMessages, readStateData) = extractAdditionalData(view: view, chatLocation: chatLocation)
|
||||
|
||||
let combinedInitialData = ChatHistoryCombinedInitialData(initialData: initialData, buttonKeyboardMessage: view.topTaggedMessages.first, cachedData: cachedData, cachedDataMessages: cachedDataMessages, readStateData: readStateData)
|
||||
|
||||
if view.isLoading {
|
||||
preloaded = false
|
||||
return .Loading(initialData: combinedInitialData, type: .Generic(type: updateType))
|
||||
}
|
||||
|
||||
if preloaded {
|
||||
return .HistoryView(view: view, type: .Generic(type: updateType), scrollPosition: nil, flashIndicators: false, originalScrollPosition: nil, initialData: combinedInitialData, id: location.id)
|
||||
|
||||
Reference in New Issue
Block a user