From 86e521c3cbb15fd1c625fbadf991f04e8a9607bb Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Tue, 7 Apr 2026 01:44:04 +0400 Subject: [PATCH] Various fixes --- .../Sources/ComposePollScreen.swift | 2 +- .../OverlayAudioPlayerControllerNode.swift | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/submodules/TelegramUI/Components/ComposePollScreen/Sources/ComposePollScreen.swift b/submodules/TelegramUI/Components/ComposePollScreen/Sources/ComposePollScreen.swift index 07a29f075e..ab6b1bb0d4 100644 --- a/submodules/TelegramUI/Components/ComposePollScreen/Sources/ComposePollScreen.swift +++ b/submodules/TelegramUI/Components/ComposePollScreen/Sources/ComposePollScreen.swift @@ -532,7 +532,7 @@ final class ComposePollScreenComponent: Component { )) } - if mappedOptions.count < 2 { + if self.isQuiz && mappedOptions.count < 2 { return .optionsNeeded } diff --git a/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift b/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift index 2fe3644275..9c050cddf5 100644 --- a/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift +++ b/submodules/TelegramUI/Sources/OverlayAudioPlayerControllerNode.swift @@ -310,12 +310,7 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, ASGestu case .file: tagMask = .file } - - var isMusicPlaylist = true - if let playlistLocation = self.playlistLocation as? PeerMessagesPlaylistLocation, case .savedMusic = playlistLocation { - isMusicPlaylist = false - } - + let chatLocationContextHolder = Atomic(value: nil) self.historyNode = ChatHistoryListNodeImpl( context: context, @@ -329,7 +324,7 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, ASGestu subject: .message(id: .id(initialMessageId), highlight: ChatControllerSubject.MessageHighlight(quote: nil), timecode: nil, setupReply: false), controllerInteraction: self.controllerInteraction, selectedMessages: .single(nil), - mode: .list(reversed: self.currentIsReversed, reverseGroups: !self.currentIsReversed, displayHeaders: .none, hintLinks: false, isGlobalSearch: self.isGlobalSearch, isMusicPlaylist: isMusicPlaylist), + mode: .list(reversed: self.currentIsReversed, reverseGroups: !self.currentIsReversed, displayHeaders: .none, hintLinks: false, isGlobalSearch: self.isGlobalSearch, isMusicPlaylist: true), isChatPreview: false, messageTransitionNode: { return nil } @@ -1204,11 +1199,6 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, ASGestu tagMask = .file } - var isMusicPlaylist = true - if let playlistLocation = self.playlistLocation as? PeerMessagesPlaylistLocation, case .savedMusic = playlistLocation { - isMusicPlaylist = false - } - let chatLocationContextHolder = Atomic(value: nil) let historyNode = ChatHistoryListNodeImpl( context: self.context, @@ -1222,7 +1212,7 @@ final class OverlayAudioPlayerControllerNode: ViewControllerTracingNode, ASGestu subject: .message(id: .id(messageId), highlight: ChatControllerSubject.MessageHighlight(quote: nil), timecode: nil, setupReply: false), controllerInteraction: self.controllerInteraction, selectedMessages: .single(nil), - mode: .list(reversed: self.currentIsReversed, reverseGroups: !self.currentIsReversed, displayHeaders: .none, hintLinks: false, isGlobalSearch: self.isGlobalSearch, isMusicPlaylist: isMusicPlaylist), + mode: .list(reversed: self.currentIsReversed, reverseGroups: !self.currentIsReversed, displayHeaders: .none, hintLinks: false, isGlobalSearch: self.isGlobalSearch, isMusicPlaylist: true), isChatPreview: false, messageTransitionNode: { return nil }