Merge commit 'eb28692e92f2375bd911d63eeb35ed8468296fda'

# Conflicts:
#	submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift
This commit is contained in:
Ali
2023-06-26 02:00:35 +03:00
27 changed files with 711 additions and 537 deletions

View File

@@ -10966,15 +10966,15 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
}
self.volumeButtonsListener = VolumeButtonsListener(shouldBeActive: shouldBeActive, valueChanged: { [weak self] in
guard let strongSelf = self, strongSelf.traceVisibility() && isTopmostChatController(strongSelf) else {
let buttonAction = { [weak self] in
guard let self, self.traceVisibility() && isTopmostChatController(self) else {
return
}
strongSelf.videoUnmuteTooltipController?.dismiss()
self.videoUnmuteTooltipController?.dismiss()
var actions: [(Bool, (Double?) -> Void)] = []
var hasUnconsumed = false
strongSelf.chatDisplayNode.historyNode.forEachVisibleItemNode { itemNode in
self.chatDisplayNode.historyNode.forEachVisibleItemNode { itemNode in
if let itemNode = itemNode as? ChatMessageItemView, let (action, _, _, isUnconsumed, _) = itemNode.playMediaWithSound() {
if case let .visible(fraction, _) = itemNode.visibility, fraction > 0.7 {
actions.insert((isUnconsumed, action), at: 0)
@@ -10990,7 +10990,12 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
break
}
}
})
}
self.volumeButtonsListener = VolumeButtonsListener(
shouldBeActive: shouldBeActive,
upPressed: buttonAction,
downPressed: buttonAction
)
self.chatDisplayNode.historyNode.openNextChannelToRead = { [weak self] peer, location in
guard let strongSelf = self else {