mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
- reset invite links [skip ci]
This commit is contained in:
parent
86e27f0706
commit
bd1f523e96
@ -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)))")
|
||||
|
Loading…
x
Reference in New Issue
Block a user