mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
@@ -1319,6 +1319,14 @@ func requestChatListFiltersSync(transaction: Transaction) {
|
||||
transaction.operationLogAddEntry(peerId: peerId, tag: tag, tagLocalIndex: .automatic, tagMergedIndex: .automatic, contents: SynchronizeChatListFiltersOperation(content: .sync))
|
||||
}
|
||||
|
||||
func _internal_chatListFiltersAreSynced(postbox: Postbox) -> Signal<Bool, NoError> {
|
||||
return postbox.mergedOperationLogView(tag: OperationLogTags.SynchronizeChatListFilters, limit: 1)
|
||||
|> map { view -> Bool in
|
||||
return view.entries.isEmpty
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
}
|
||||
|
||||
func managedChatListFilters(postbox: Postbox, network: Network, accountPeerId: PeerId) -> Signal<Void, NoError> {
|
||||
return Signal { _ in
|
||||
let updateFeaturedDisposable = _internal_updateChatListFeaturedFilters(postbox: postbox, network: network).start()
|
||||
|
||||
@@ -245,6 +245,15 @@ public extension TelegramEngine {
|
||||
public func updatePeerMuteSetting(peerId: PeerId, threadId: Int64?, muteInterval: Int32?) -> Signal<Void, NoError> {
|
||||
return _internal_updatePeerMuteSetting(account: self.account, peerId: peerId, threadId: threadId, muteInterval: muteInterval)
|
||||
}
|
||||
|
||||
public func updateMultiplePeerMuteSettings(peerIds: [EnginePeer.Id], muted: Bool) -> Signal<Never, NoError> {
|
||||
return self.account.postbox.transaction { transaction -> Void in
|
||||
for peerId in peerIds {
|
||||
_internal_updatePeerMuteSetting(account: self.account, transaction: transaction, peerId: peerId, threadId: nil, muteInterval: muted ? Int32.max : nil)
|
||||
}
|
||||
}
|
||||
|> ignoreValues
|
||||
}
|
||||
|
||||
public func updatePeerDisplayPreviewsSetting(peerId: PeerId, threadId: Int64?, displayPreviews: PeerNotificationDisplayPreviews) -> Signal<Void, NoError> {
|
||||
return _internal_updatePeerDisplayPreviewsSetting(account: self.account, peerId: peerId, threadId: threadId, displayPreviews: displayPreviews)
|
||||
@@ -512,6 +521,10 @@ public extension TelegramEngine {
|
||||
public func updatedChatListFilters() -> Signal<[ChatListFilter], NoError> {
|
||||
return _internal_updatedChatListFilters(postbox: self.account.postbox, hiddenIds: self.account.viewTracker.hiddenChatListFilterIds)
|
||||
}
|
||||
|
||||
public func chatListFiltersAreSynced() -> Signal<Bool, NoError> {
|
||||
return _internal_chatListFiltersAreSynced(postbox: self.account.postbox)
|
||||
}
|
||||
|
||||
public func updatedChatListFiltersInfo() -> Signal<(filters: [ChatListFilter], synchronized: Bool), NoError> {
|
||||
return _internal_updatedChatListFiltersInfo(postbox: self.account.postbox)
|
||||
|
||||
Reference in New Issue
Block a user