diff --git a/submodules/ChatListUI/Sources/Node/ChatListItem.swift b/submodules/ChatListUI/Sources/Node/ChatListItem.swift index 76dbdb1cb7..58b00e48d3 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListItem.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListItem.swift @@ -1365,7 +1365,8 @@ class ChatListItemNode: ItemListRevealOptionsItemNode { currentSecretIconImage = PresentationResourcesChatList.secretIcon(item.presentationData.theme) } var credibilityIconOffset: CGFloat = 0.0 - if !isPeerGroup { + + if !isPeerGroup && item.index.messageIndex.id.peerId != item.context.account.peerId { if displayAsMessage { switch item.content { case let .peer(messages, _, _, _, _, _, _, _, _, _, _, _, _): diff --git a/submodules/Display/Source/Navigation/NavigationContainer.swift b/submodules/Display/Source/Navigation/NavigationContainer.swift index babe28bc0b..eb33541af4 100644 --- a/submodules/Display/Source/Navigation/NavigationContainer.swift +++ b/submodules/Display/Source/Navigation/NavigationContainer.swift @@ -470,8 +470,15 @@ public final class NavigationContainer: ASDisplayNode, UIGestureRecognizerDelega }) } else { if let fromValue = fromValue { + if viewTreeContainsFirstResponder(view: fromValue.value.view) { + self.ignoreInputHeight = true + } + fromValue.value.viewWillLeaveNavigation() fromValue.value.viewWillDisappear(false) + + self.keyboardViewManager?.dismissEditingWithoutAnimation(view: fromValue.value.view) + fromValue.value.setIgnoreAppearanceMethodInvocations(true) fromValue.value.displayNode.removeFromSupernode() fromValue.value.setIgnoreAppearanceMethodInvocations(false) @@ -487,6 +494,7 @@ public final class NavigationContainer: ASDisplayNode, UIGestureRecognizerDelega toValue.value.displayNode.recursivelyEnsureDisplaySynchronously(true) toValue.value.viewDidAppear(false) } + self.ignoreInputHeight = false } } diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h index eaa49d13ee..de6f247dda 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h @@ -60,7 +60,7 @@ typedef enum { - (id)accessChecker; -- (id)requestAudioSession:(TGAudioSessionType)type interrupted:(void (^)())interrupted; +- (id)requestAudioSession:(TGAudioSessionType)type activated:(void (^)())activated interrupted:(void (^)())interrupted; - (SThreadPool *)sharedMediaImageProcessingThreadPool; - (TGMemoryImageCache *)sharedMediaMemoryImageCache; diff --git a/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m b/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m index e6433090d5..e7311f8915 100644 --- a/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m +++ b/submodules/LegacyComponents/Sources/PGCameraCaptureSession.m @@ -367,7 +367,7 @@ const NSInteger PGCameraFrameRate = 30; _hasAudioSession = true; [_audioSessionQueue dispatchSync:^ { - [_currentAudioSession setDisposable:[[LegacyComponentsGlobals provider] requestAudioSession:TGAudioSessionTypePlayAndRecord interrupted:nil]]; + [_currentAudioSession setDisposable:[[LegacyComponentsGlobals provider] requestAudioSession:TGAudioSessionTypePlayAndRecord activated:nil interrupted:nil]]; }]; } diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m index c791fcca84..e53bec9b25 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryVideoItemView.m @@ -1120,7 +1120,7 @@ __weak TGMediaPickerGalleryVideoItemView *weakSelf = self; [[SQueue concurrentDefaultQueue] dispatch:^ { - [_currentAudioSession setDisposable:[[LegacyComponentsGlobals provider] requestAudioSession:TGAudioSessionTypePlayVideo interrupted:^ + [_currentAudioSession setDisposable:[[LegacyComponentsGlobals provider] requestAudioSession:TGAudioSessionTypePlayVideo activated:nil interrupted:^ { TGDispatchOnMainThread(^ { diff --git a/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m b/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m index f105a65d78..e9cc6b88c6 100644 --- a/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m +++ b/submodules/LegacyComponents/Sources/TGVideoMessageCaptureController.m @@ -572,10 +572,6 @@ typedef enum [self _transitionIn]; [self _beginAudioSession:false]; - [_queue dispatch:^ - { - [_capturePipeline startRunning]; - }]; } - (void)viewDidAppear:(BOOL)animated @@ -1308,7 +1304,16 @@ typedef enum _otherAudioPlaying = [[AVAudioSession sharedInstance] isOtherAudioPlaying]; __weak TGVideoMessageCaptureController *weakSelf = self; - id disposable = [[LegacyComponentsGlobals provider] requestAudioSession:speaker ? TGAudioSessionTypePlayAndRecordHeadphones : TGAudioSessionTypePlayAndRecord interrupted:^ + id disposable = [[LegacyComponentsGlobals provider] requestAudioSession:speaker ? TGAudioSessionTypePlayAndRecordHeadphones : TGAudioSessionTypePlayAndRecord + activated:^{ + __strong TGVideoMessageCaptureController *strongSelf = weakSelf; + if (strongSelf != nil) { + [strongSelf->_queue dispatch:^ + { + [strongSelf->_capturePipeline startRunning]; + }]; + } + } interrupted:^ { TGDispatchOnMainThread(^{ __strong TGVideoMessageCaptureController *strongSelf = weakSelf; diff --git a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift index 5a531b560e..a0a93d0cf9 100644 --- a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift +++ b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift @@ -177,7 +177,7 @@ private final class LegacyComponentsGlobalsProviderImpl: NSObject, LegacyCompone return LegacyComponentsAccessCheckerImpl(context: legacyContext) } - public func request(_ type: TGAudioSessionType, interrupted: (() -> Void)!) -> SDisposable! { + public func request(_ type: TGAudioSessionType, activated: (() -> Void)!, interrupted: (() -> Void)!) -> SDisposable! { if let legacyContext = legacyContext { let convertedType: ManagedAudioSessionType switch type { @@ -187,6 +187,7 @@ private final class LegacyComponentsGlobalsProviderImpl: NSObject, LegacyCompone convertedType = .play } let disposable = legacyContext.sharedContext.mediaManager.audioSession.push(audioSessionType: convertedType, once: true, activate: { _ in + activated?() }, deactivate: { _ in interrupted?() return .complete() diff --git a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift index 3bde5c806c..cb2ed8527a 100644 --- a/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift +++ b/submodules/StickerPackPreviewUI/Sources/StickerPackScreen.swift @@ -177,8 +177,8 @@ private final class StickerPackContainer: ASDisplayNode { self.addSubnode(self.backgroundNode) self.addSubnode(self.gridNode) -// self.addSubnode(self.actionAreaBackgroundNode) -// self.addSubnode(self.actionAreaSeparatorNode) + self.addSubnode(self.actionAreaBackgroundNode) + self.addSubnode(self.actionAreaSeparatorNode) self.addSubnode(self.buttonNode) self.addSubnode(self.titleBackgroundnode)