mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Stories
This commit is contained in:
@@ -723,17 +723,18 @@ func chatForumTopicMenuItems(context: AccountContext, peerId: PeerId, threadId:
|
||||
return context.engine.peers.updatePeerDisplayPreviewsSetting(peerId: peerId, threadId: threadId, displayPreviews: displayPreviews) |> deliverOnMainQueue
|
||||
}
|
||||
|
||||
let updatePeerStoryNotifications: (PeerId, PeerNotificationDisplayPreviews) -> Signal<Void, NoError> = { peerId, storyNotifications in
|
||||
var isMuted: Bool?
|
||||
switch storyNotifications {
|
||||
case .default:
|
||||
isMuted = nil
|
||||
case .show:
|
||||
isMuted = false
|
||||
case .hide:
|
||||
isMuted = true
|
||||
}
|
||||
return context.engine.peers.updatePeerStoriesMutedSetting(peerId: peerId, isMuted: isMuted) |> deliverOnMainQueue
|
||||
let updatePeerStoriesMuted: (PeerId, PeerStoryNotificationSettings.Mute) -> Signal<Void, NoError> = {
|
||||
peerId, mute in
|
||||
return context.engine.peers.updatePeerStoriesMutedSetting(peerId: peerId, mute: mute) |> deliverOnMainQueue
|
||||
}
|
||||
|
||||
let updatePeerStoriesHideSender: (PeerId, PeerStoryNotificationSettings.HideSender) -> Signal<Void, NoError> = {
|
||||
peerId, hideSender in
|
||||
return context.engine.peers.updatePeerStoriesHideSenderSetting(peerId: peerId, hideSender: hideSender) |> deliverOnMainQueue
|
||||
}
|
||||
|
||||
let updatePeerStorySound: (PeerId, PeerMessageSound) -> Signal<Void, NoError> = { peerId, sound in
|
||||
return context.engine.peers.updatePeerStorySoundInteractive(peerId: peerId, sound: sound) |> deliverOnMainQueue
|
||||
}
|
||||
|
||||
let defaultSound: PeerMessageSound
|
||||
@@ -769,8 +770,14 @@ func chatForumTopicMenuItems(context: AccountContext, peerId: PeerId, threadId:
|
||||
|> deliverOnMainQueue).start(next: { _ in
|
||||
|
||||
})
|
||||
}, updatePeerStoryNotifications: { peerId, storyNotifications in
|
||||
let _ = (updatePeerStoryNotifications(peerId, storyNotifications)
|
||||
}, updatePeerStoriesMuted: { peerId, mute in
|
||||
let _ = (updatePeerStoriesMuted(peerId, mute)
|
||||
|> deliverOnMainQueue).start()
|
||||
}, updatePeerStoriesHideSender: { peerId, hideSender in
|
||||
let _ = (updatePeerStoriesHideSender(peerId, hideSender)
|
||||
|> deliverOnMainQueue).start()
|
||||
}, updatePeerStorySound: { peerId, sound in
|
||||
let _ = (updatePeerStorySound(peerId, sound)
|
||||
|> deliverOnMainQueue).start()
|
||||
}, removePeerFromExceptions: {
|
||||
}, modifiedPeer: {
|
||||
|
||||
Reference in New Issue
Block a user