diff --git a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h index ee8dcc1e23..41aef1a597 100644 --- a/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h +++ b/submodules/LegacyComponents/PublicHeaders/LegacyComponents/LegacyComponentsGlobals.h @@ -29,6 +29,8 @@ typedef enum { @protocol LegacyComponentsGlobalsProvider +- (void)makeViewDisableInteractiveKeyboardGestureRecognizer:(UIView *)view; + - (TGLocalization *)effectiveLocalization; - (void)log:(NSString *)string; - (NSArray *)applicationWindows; diff --git a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m index a9b1e07199..f5cd71d600 100644 --- a/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m +++ b/submodules/LegacyComponents/Sources/TGMediaPickerGalleryInterfaceView.m @@ -108,6 +108,8 @@ self = [super initWithFrame:CGRectZero]; if (self != nil) { + [[LegacyComponentsGlobals provider] makeViewDisableInteractiveKeyboardGestureRecognizer:self]; + _actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true]; _context = context; diff --git a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift index 16a8c05cab..ac530e80e7 100644 --- a/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift +++ b/submodules/LegacyUI/Sources/TelegramInitializeLegacyComponents.swift @@ -174,6 +174,10 @@ private final class LegacyComponentsGlobalsProviderImpl: NSObject, LegacyCompone legacyOpenUrl(url) } + public func makeViewDisableInteractiveKeyboardGestureRecognizer(_ view: UIView!) { + view.disablesInteractiveKeyboardGestureRecognizer = true + } + public func disableUserInteraction(for timeInterval: TimeInterval) { } diff --git a/submodules/TelegramCore/Sources/GroupCalls.swift b/submodules/TelegramCore/Sources/GroupCalls.swift index 9b7eec5c9e..2e12c0d761 100644 --- a/submodules/TelegramCore/Sources/GroupCalls.swift +++ b/submodules/TelegramCore/Sources/GroupCalls.swift @@ -1016,6 +1016,7 @@ public final class GroupCallParticipantsContext { private var activityRankResetTimer: SwiftSignalKit.Timer? private let updateDefaultMuteDisposable = MetaDisposable() + private let resetInviteLinksDisposable = MetaDisposable() private let updateShouldBeRecordingDisposable = MetaDisposable() public struct ServiceState { @@ -1146,6 +1147,7 @@ public final class GroupCallParticipantsContext { self.updateDefaultMuteDisposable.dispose() self.updateShouldBeRecordingDisposable.dispose() self.activityRankResetTimer?.invalidate() + resetInviteLinksDisposable.dispose() } public func addUpdates(updates: [Update]) { @@ -1617,6 +1619,16 @@ public final class GroupCallParticipantsContext { })) } + public func resetInviteLinks() { + self.resetInviteLinksDisposable.set((self.account.network.request(Api.functions.phone.toggleGroupCallSettings(flags: 1 << 1, call: .inputGroupCall(id: self.id, accessHash: self.accessHash), joinMuted: nil)) + |> deliverOnMainQueue).start(next: { [weak self] updates in + guard let strongSelf = self else { + return + } + strongSelf.account.stateManager.addUpdates(updates) + })) + } + public func loadMore(token: String) { if token != self.stateValue.state.nextParticipantsFetchOffset { Logger.shared.log("GroupCallParticipantsContext", "loadMore called with an invalid token \(token) (the valid one is \(String(describing: self.stateValue.state.nextParticipantsFetchOffset)))")