mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
05aab93e6a
@ -2489,7 +2489,15 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
|
|
||||||
self.context.sharedContext.mediaManager.setOverlayVideoNode(nil)
|
self.context.sharedContext.mediaManager.setOverlayVideoNode(nil)
|
||||||
} else {
|
} else {
|
||||||
let scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition()
|
var scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition()
|
||||||
|
|
||||||
|
if let data = self.context.currentAppConfiguration.with({ $0 }).data {
|
||||||
|
if let value = data["ios_gallery_scrubber_transition"] as? Double {
|
||||||
|
if value == 0.0 {
|
||||||
|
scrubberTransition = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let scrubberView = self.scrubberView {
|
if let scrubberView = self.scrubberView {
|
||||||
scrubberView.animateIn(from: scrubberTransition, transition: .animated(duration: 0.25, curve: .spring))
|
scrubberView.animateIn(from: scrubberTransition, transition: .animated(duration: 0.25, curve: .spring))
|
||||||
@ -2633,7 +2641,14 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition()
|
var scrubberTransition = (node.0 as? GalleryItemTransitionNode)?.scrubberTransition()
|
||||||
|
if let data = self.context.currentAppConfiguration.with({ $0 }).data {
|
||||||
|
if let value = data["ios_gallery_scrubber_transition"] as? Double {
|
||||||
|
if value == 0.0 {
|
||||||
|
scrubberTransition = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let scrubberView = self.scrubberView {
|
if let scrubberView = self.scrubberView {
|
||||||
var scrubberEffectiveTransition = scrubberTransition
|
var scrubberEffectiveTransition = scrubberTransition
|
||||||
|
@ -399,8 +399,10 @@ public final class PresentationCallImpl: PresentationCall {
|
|||||||
|
|
||||||
if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] {
|
if let data = context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_call_device"] {
|
||||||
self.sharedAudioContext = nil
|
self.sharedAudioContext = nil
|
||||||
} else {
|
} else if context.sharedContext.immediateExperimentalUISettings.conferenceCalls {
|
||||||
self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration)
|
self.sharedAudioContext = SharedCallAudioContext(audioSession: audioSession, callKitIntegration: callKitIntegration)
|
||||||
|
} else {
|
||||||
|
self.sharedAudioContext = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if let _ = self.sharedAudioContext {
|
if let _ = self.sharedAudioContext {
|
||||||
|
@ -7142,13 +7142,7 @@ public func shouldUseV2VideoChatImpl(context: AccountContext) -> Bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal<Any, NoError> {
|
public func makeVoiceChatControllerInitialData(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall) -> Signal<Any, NoError> {
|
||||||
let useV2 = shouldUseV2VideoChatImpl(context: accountContext)
|
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
|
||||||
|
|
||||||
if useV2 {
|
|
||||||
return VideoChatScreenV2Impl.initialData(call: call) |> map { $0 as Any }
|
|
||||||
} else {
|
|
||||||
return .single(Void())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController {
|
public func makeVoiceChatController(sharedContext: SharedAccountContext, accountContext: AccountContext, call: VideoChatCall, initialData: Any, sourceCallController: CallController?) -> VoiceChatController {
|
||||||
|
@ -1260,11 +1260,12 @@ public final class GroupCallParticipantsContext {
|
|||||||
sortAgain = true
|
sortAgain = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if let hasLocalVideoPeerId = state.overlayState.hasLocalVideo, hasLocalVideoPeerId == publicState.participants[i].peer.id {
|
//TODO:wip-release
|
||||||
|
/*if let hasLocalVideoPeerId = state.overlayState.hasLocalVideo, hasLocalVideoPeerId == publicState.participants[i].peer.id {
|
||||||
if publicState.participants[i].videoDescription == nil {
|
if publicState.participants[i].videoDescription == nil {
|
||||||
publicState.participants[i].videoDescription = GroupCallParticipantsContext.Participant.VideoDescription(endpointId: "_local", ssrcGroups: [], audioSsrc: nil, isPaused: false)
|
publicState.participants[i].videoDescription = GroupCallParticipantsContext.Participant.VideoDescription(endpointId: "_local", ssrcGroups: [], audioSsrc: nil, isPaused: false)
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
if sortAgain {
|
if sortAgain {
|
||||||
publicState.participants.sort(by: { GroupCallParticipantsContext.Participant.compare(lhs: $0, rhs: $1, sortAscending: publicState.sortAscending) })
|
publicState.participants.sort(by: { GroupCallParticipantsContext.Participant.compare(lhs: $0, rhs: $1, sortAscending: publicState.sortAscending) })
|
||||||
@ -1954,9 +1955,10 @@ public final class GroupCallParticipantsContext {
|
|||||||
self.localIsVideoPaused = isVideoPaused
|
self.localIsVideoPaused = isVideoPaused
|
||||||
self.localIsPresentationPaused = isPresentationPaused
|
self.localIsPresentationPaused = isPresentationPaused
|
||||||
|
|
||||||
if let isVideoMuted {
|
//TODO:wip-release
|
||||||
|
/*if let isVideoMuted {
|
||||||
self.stateValue.overlayState.hasLocalVideo = isVideoMuted ? nil : peerId
|
self.stateValue.overlayState.hasLocalVideo = isVideoMuted ? nil : peerId
|
||||||
}
|
}*/
|
||||||
|
|
||||||
let disposable = MetaDisposable()
|
let disposable = MetaDisposable()
|
||||||
|
|
||||||
|
@ -868,12 +868,27 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr
|
|||||||
let _ = peerType
|
let _ = peerType
|
||||||
|
|
||||||
var useInlineHLS = true
|
var useInlineHLS = true
|
||||||
|
var displayInlineScrubber = true
|
||||||
|
var startFromSavedPosition = true
|
||||||
if let data = context.currentAppConfiguration.with({ $0 }).data {
|
if let data = context.currentAppConfiguration.with({ $0 }).data {
|
||||||
if let value = data["ios_inline_hls_v2"] as? Double {
|
if let value = data["ios_inline_hls_v2"] as? Double {
|
||||||
useInlineHLS = value != 0.0
|
useInlineHLS = value != 0.0
|
||||||
}
|
}
|
||||||
|
if let value = data["ios_inline_scrubber"] as? Double {
|
||||||
|
displayInlineScrubber = value != 0.0
|
||||||
|
}
|
||||||
|
if let value = data["ios_inline_continue"] as? Double {
|
||||||
|
startFromSavedPosition = value != 0.0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*#if DEBUG
|
||||||
|
if "".isEmpty {
|
||||||
|
displayInlineScrubber = false
|
||||||
|
startFromSavedPosition = false
|
||||||
|
}
|
||||||
|
#endif*/
|
||||||
|
|
||||||
var nativeSize: CGSize
|
var nativeSize: CGSize
|
||||||
|
|
||||||
let isSecretMedia = message.containsSecretMedia
|
let isSecretMedia = message.containsSecretMedia
|
||||||
@ -1940,7 +1955,7 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr
|
|||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
if firstTime {
|
if firstTime {
|
||||||
firstTime = false
|
firstTime = false
|
||||||
if let videoTimestamp {
|
if startFromSavedPosition, let videoTimestamp {
|
||||||
videoNode.seek(Double(videoTimestamp))
|
videoNode.seek(Double(videoTimestamp))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2028,7 +2043,7 @@ public final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let videoTimestamp, let file = media as? TelegramMediaFile, let duration = file.duration, duration > 1.0 {
|
if displayInlineScrubber, let videoTimestamp, let file = media as? TelegramMediaFile, let duration = file.duration, duration > 1.0 {
|
||||||
let timestampContainerView: UIView
|
let timestampContainerView: UIView
|
||||||
if let current = strongSelf.timestampContainerView {
|
if let current = strongSelf.timestampContainerView {
|
||||||
timestampContainerView = current
|
timestampContainerView = current
|
||||||
|
@ -2752,7 +2752,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|
|||||||
private func maybeCheckForUpdates() {
|
private func maybeCheckForUpdates() {
|
||||||
#if targetEnvironment(simulator)
|
#if targetEnvironment(simulator)
|
||||||
#else
|
#else
|
||||||
guard let buildConfig = self.buildConfig, !buildConfig.isAppStoreBuild, let appCenterId = buildConfig.appCenterId, !appCenterId.isEmpty else {
|
guard let buildConfig = self.buildConfig, let appCenterId = buildConfig.appCenterId, !appCenterId.isEmpty else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let timestamp = CFAbsoluteTimeGetCurrent()
|
let timestamp = CFAbsoluteTimeGetCurrent()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user