mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-03 21:16:35 +00:00
Merge commit 'bd1f523e965b21b09934a08cf1c11e8cf0669f17'
This commit is contained in:
commit
aa2e0f5859
@ -29,6 +29,8 @@ typedef enum {
|
|||||||
|
|
||||||
@protocol LegacyComponentsGlobalsProvider <NSObject>
|
@protocol LegacyComponentsGlobalsProvider <NSObject>
|
||||||
|
|
||||||
|
- (void)makeViewDisableInteractiveKeyboardGestureRecognizer:(UIView *)view;
|
||||||
|
|
||||||
- (TGLocalization *)effectiveLocalization;
|
- (TGLocalization *)effectiveLocalization;
|
||||||
- (void)log:(NSString *)string;
|
- (void)log:(NSString *)string;
|
||||||
- (NSArray<UIWindow *> *)applicationWindows;
|
- (NSArray<UIWindow *> *)applicationWindows;
|
||||||
|
|||||||
@ -108,6 +108,8 @@
|
|||||||
self = [super initWithFrame:CGRectZero];
|
self = [super initWithFrame:CGRectZero];
|
||||||
if (self != nil)
|
if (self != nil)
|
||||||
{
|
{
|
||||||
|
[[LegacyComponentsGlobals provider] makeViewDisableInteractiveKeyboardGestureRecognizer:self];
|
||||||
|
|
||||||
_actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true];
|
_actionHandle = [[ASHandle alloc] initWithDelegate:self releaseOnMainThread:true];
|
||||||
|
|
||||||
_context = context;
|
_context = context;
|
||||||
|
|||||||
@ -174,6 +174,10 @@ private final class LegacyComponentsGlobalsProviderImpl: NSObject, LegacyCompone
|
|||||||
legacyOpenUrl(url)
|
legacyOpenUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func makeViewDisableInteractiveKeyboardGestureRecognizer(_ view: UIView!) {
|
||||||
|
view.disablesInteractiveKeyboardGestureRecognizer = true
|
||||||
|
}
|
||||||
|
|
||||||
public func disableUserInteraction(for timeInterval: TimeInterval) {
|
public func disableUserInteraction(for timeInterval: TimeInterval) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1016,6 +1016,7 @@ public final class GroupCallParticipantsContext {
|
|||||||
private var activityRankResetTimer: SwiftSignalKit.Timer?
|
private var activityRankResetTimer: SwiftSignalKit.Timer?
|
||||||
|
|
||||||
private let updateDefaultMuteDisposable = MetaDisposable()
|
private let updateDefaultMuteDisposable = MetaDisposable()
|
||||||
|
private let resetInviteLinksDisposable = MetaDisposable()
|
||||||
private let updateShouldBeRecordingDisposable = MetaDisposable()
|
private let updateShouldBeRecordingDisposable = MetaDisposable()
|
||||||
|
|
||||||
public struct ServiceState {
|
public struct ServiceState {
|
||||||
@ -1146,6 +1147,7 @@ public final class GroupCallParticipantsContext {
|
|||||||
self.updateDefaultMuteDisposable.dispose()
|
self.updateDefaultMuteDisposable.dispose()
|
||||||
self.updateShouldBeRecordingDisposable.dispose()
|
self.updateShouldBeRecordingDisposable.dispose()
|
||||||
self.activityRankResetTimer?.invalidate()
|
self.activityRankResetTimer?.invalidate()
|
||||||
|
resetInviteLinksDisposable.dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
public func addUpdates(updates: [Update]) {
|
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) {
|
public func loadMore(token: String) {
|
||||||
if token != self.stateValue.state.nextParticipantsFetchOffset {
|
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)))")
|
Logger.shared.log("GroupCallParticipantsContext", "loadMore called with an invalid token \(token) (the valid one is \(String(describing: self.stateValue.state.nextParticipantsFetchOffset)))")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user