Merge commit 'bd1f523e965b21b09934a08cf1c11e8cf0669f17'

This commit is contained in:
Ali 2021-03-16 20:05:14 +04:00
commit aa2e0f5859
4 changed files with 20 additions and 0 deletions

View File

@ -29,6 +29,8 @@ typedef enum {
@protocol LegacyComponentsGlobalsProvider <NSObject>
- (void)makeViewDisableInteractiveKeyboardGestureRecognizer:(UIView *)view;
- (TGLocalization *)effectiveLocalization;
- (void)log:(NSString *)string;
- (NSArray<UIWindow *> *)applicationWindows;

View File

@ -108,6 +108,8 @@
self = [super initWithFrame:CGRectZero];
if (self != nil)
{
[[LegacyComponentsGlobals provider] makeViewDisableInteractiveKeyboardGestureRecognizer:self];
_actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true];
_context = context;

View File

@ -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) {
}

View File

@ -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)))")