mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Implemented chat-specific themes
This commit is contained in:
@@ -559,7 +559,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
||||
|
||||
private let clientId: Atomic<Int32>
|
||||
|
||||
public init(context: AccountContext, chatLocation: ChatLocation, chatLocationContextHolder: Atomic<ChatLocationContextHolder?>, tagMask: MessageTags?, source: ChatHistoryListSource = .default, subject: ChatControllerSubject?, controllerInteraction: ChatControllerInteraction, selectedMessages: Signal<Set<MessageId>?, NoError>, mode: ChatHistoryListMode = .bubbles, messageTransitionNode: @escaping () -> ChatMessageTransitionNode? = { nil }) {
|
||||
public init(context: AccountContext, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>), chatLocation: ChatLocation, chatLocationContextHolder: Atomic<ChatLocationContextHolder?>, tagMask: MessageTags?, source: ChatHistoryListSource = .default, subject: ChatControllerSubject?, controllerInteraction: ChatControllerInteraction, selectedMessages: Signal<Set<MessageId>?, NoError>, mode: ChatHistoryListMode = .bubbles, messageTransitionNode: @escaping () -> ChatMessageTransitionNode? = { nil }) {
|
||||
var tagMask = tagMask
|
||||
var appendMessagesFromTheSameGroup = false
|
||||
if case .pinnedMessages = subject {
|
||||
@@ -575,7 +575,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
||||
self.controllerInteraction = controllerInteraction
|
||||
self.mode = mode
|
||||
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
let presentationData = updatedPresentationData.initial
|
||||
self.currentPresentationData = ChatPresentationData(theme: ChatPresentationThemeData(theme: presentationData.theme, wallpaper: presentationData.chatWallpaper), fontSize: presentationData.chatFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true, largeEmoji: presentationData.largeEmoji, chatBubbleCorners: presentationData.chatBubbleCorners, animatedEmojiScale: 1.0)
|
||||
|
||||
self.chatPresentationDataPromise = Promise(self.currentPresentationData)
|
||||
@@ -1088,7 +1088,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
|
||||
|
||||
self.presentationDataDisposable = (
|
||||
combineLatest(queue: .mainQueue(),
|
||||
context.sharedContext.presentationData,
|
||||
updatedPresentationData.signal,
|
||||
appConfiguration)
|
||||
|> deliverOnMainQueue).start(next: { [weak self] presentationData, appConfiguration in
|
||||
if let strongSelf = self {
|
||||
|
||||
Reference in New Issue
Block a user