mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Various improvements
This commit is contained in:
parent
ae1fd7df68
commit
f918ce716e
@ -96,7 +96,7 @@ func messageContentToUpload(accountPeerId: PeerId, network: Network, postbox: Po
|
|||||||
return .content(PendingMessageUploadedContentAndReuploadInfo(content: .media(.inputMediaStory(userId: inputUser, id: media.storyId.id), ""), reuploadInfo: nil, cacheReferenceKey: nil))
|
return .content(PendingMessageUploadedContentAndReuploadInfo(content: .media(.inputMediaStory(userId: inputUser, id: media.storyId.id), ""), reuploadInfo: nil, cacheReferenceKey: nil))
|
||||||
}
|
}
|
||||||
|> castError(PendingMessageUploadError.self), .text)
|
|> castError(PendingMessageUploadError.self), .text)
|
||||||
} else if let media = media.first, let mediaResult = mediaContentToUpload(accountPeerId: accountPeerId, network: network, postbox: postbox, auxiliaryMethods: auxiliaryMethods, transformOutgoingMessageMedia: transformOutgoingMessageMedia, messageMediaPreuploadManager: messageMediaPreuploadManager, revalidationContext: revalidationContext, forceReupload: forceReupload, isGrouped: isGrouped, passFetchProgress: false, peerId: peerId, media: media, text: text, autoremoveMessageAttribute: autoremoveMessageAttribute, autoclearMessageAttribute: autoclearMessageAttribute, messageId: messageId, attributes: attributes) {
|
} else if let media = media.first, let mediaResult = mediaContentToUpload(accountPeerId: accountPeerId, network: network, postbox: postbox, auxiliaryMethods: auxiliaryMethods, transformOutgoingMessageMedia: transformOutgoingMessageMedia, messageMediaPreuploadManager: messageMediaPreuploadManager, revalidationContext: revalidationContext, forceReupload: forceReupload, isGrouped: isGrouped, passFetchProgress: passFetchProgress, peerId: peerId, media: media, text: text, autoremoveMessageAttribute: autoremoveMessageAttribute, autoclearMessageAttribute: autoclearMessageAttribute, messageId: messageId, attributes: attributes) {
|
||||||
return .signal(mediaResult, .media)
|
return .signal(mediaResult, .media)
|
||||||
} else {
|
} else {
|
||||||
return .signal(.single(.content(PendingMessageUploadedContentAndReuploadInfo(content: .text(text), reuploadInfo: nil, cacheReferenceKey: nil))), .text)
|
return .signal(.single(.content(PendingMessageUploadedContentAndReuploadInfo(content: .text(text), reuploadInfo: nil, cacheReferenceKey: nil))), .text)
|
||||||
|
@ -607,7 +607,7 @@ private func prepareUploadStoryContent(account: Account, media: EngineStoryInput
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func uploadedStoryContent(postbox: Postbox, network: Network, media: Media, accountPeerId: PeerId, messageMediaPreuploadManager: MessageMediaPreuploadManager, revalidationContext: MediaReferenceRevalidationContext, auxiliaryMethods: AccountAuxiliaryMethods) -> (signal: Signal<PendingMessageUploadedContentResult?, NoError>, media: Media) {
|
private func uploadedStoryContent(postbox: Postbox, network: Network, media: Media, accountPeerId: PeerId, messageMediaPreuploadManager: MessageMediaPreuploadManager, revalidationContext: MediaReferenceRevalidationContext, auxiliaryMethods: AccountAuxiliaryMethods, passFetchProgress: Bool) -> (signal: Signal<PendingMessageUploadedContentResult?, NoError>, media: Media) {
|
||||||
let originalMedia: Media = media
|
let originalMedia: Media = media
|
||||||
let contentToUpload: MessageContentToUpload
|
let contentToUpload: MessageContentToUpload
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ private func uploadedStoryContent(postbox: Postbox, network: Network, media: Med
|
|||||||
revalidationContext: revalidationContext,
|
revalidationContext: revalidationContext,
|
||||||
forceReupload: true,
|
forceReupload: true,
|
||||||
isGrouped: false,
|
isGrouped: false,
|
||||||
passFetchProgress: false,
|
passFetchProgress: passFetchProgress,
|
||||||
peerId: accountPeerId,
|
peerId: accountPeerId,
|
||||||
messageId: nil,
|
messageId: nil,
|
||||||
attributes: [],
|
attributes: [],
|
||||||
@ -758,7 +758,8 @@ private func _internal_putPendingStoryIdMapping(accountPeerId: PeerId, stableId:
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _internal_uploadStoryImpl(postbox: Postbox, network: Network, accountPeerId: PeerId, stateManager: AccountStateManager, messageMediaPreuploadManager: MessageMediaPreuploadManager, revalidationContext: MediaReferenceRevalidationContext, auxiliaryMethods: AccountAuxiliaryMethods, stableId: Int32, media: Media, text: String, entities: [MessageTextEntity], pin: Bool, privacy: EngineStoryPrivacy, isForwardingDisabled: Bool, period: Int, randomId: Int64) -> Signal<StoryUploadResult, NoError> {
|
func _internal_uploadStoryImpl(postbox: Postbox, network: Network, accountPeerId: PeerId, stateManager: AccountStateManager, messageMediaPreuploadManager: MessageMediaPreuploadManager, revalidationContext: MediaReferenceRevalidationContext, auxiliaryMethods: AccountAuxiliaryMethods, stableId: Int32, media: Media, text: String, entities: [MessageTextEntity], pin: Bool, privacy: EngineStoryPrivacy, isForwardingDisabled: Bool, period: Int, randomId: Int64) -> Signal<StoryUploadResult, NoError> {
|
||||||
let (contentSignal, originalMedia) = uploadedStoryContent(postbox: postbox, network: network, media: media, accountPeerId: accountPeerId, messageMediaPreuploadManager: messageMediaPreuploadManager, revalidationContext: revalidationContext, auxiliaryMethods: auxiliaryMethods)
|
let passFetchProgress = media is TelegramMediaFile
|
||||||
|
let (contentSignal, originalMedia) = uploadedStoryContent(postbox: postbox, network: network, media: media, accountPeerId: accountPeerId, messageMediaPreuploadManager: messageMediaPreuploadManager, revalidationContext: revalidationContext, auxiliaryMethods: auxiliaryMethods, passFetchProgress: passFetchProgress)
|
||||||
return contentSignal
|
return contentSignal
|
||||||
|> mapToSignal { result -> Signal<StoryUploadResult, NoError> in
|
|> mapToSignal { result -> Signal<StoryUploadResult, NoError> in
|
||||||
switch result {
|
switch result {
|
||||||
@ -896,7 +897,11 @@ func _internal_editStory(account: Account, media: EngineStoryInputMedia?, id: In
|
|||||||
let contentSignal: Signal<PendingMessageUploadedContentResult?, NoError>
|
let contentSignal: Signal<PendingMessageUploadedContentResult?, NoError>
|
||||||
let originalMedia: Media?
|
let originalMedia: Media?
|
||||||
if let media = media {
|
if let media = media {
|
||||||
(contentSignal, originalMedia) = uploadedStoryContent(postbox: account.postbox, network: account.network, media: prepareUploadStoryContent(account: account, media: media), accountPeerId: account.peerId, messageMediaPreuploadManager: account.messageMediaPreuploadManager, revalidationContext: account.mediaReferenceRevalidationContext, auxiliaryMethods: account.auxiliaryMethods)
|
var passFetchProgress = false
|
||||||
|
if case .video = media {
|
||||||
|
passFetchProgress = true
|
||||||
|
}
|
||||||
|
(contentSignal, originalMedia) = uploadedStoryContent(postbox: account.postbox, network: account.network, media: prepareUploadStoryContent(account: account, media: media), accountPeerId: account.peerId, messageMediaPreuploadManager: account.messageMediaPreuploadManager, revalidationContext: account.mediaReferenceRevalidationContext, auxiliaryMethods: account.auxiliaryMethods, passFetchProgress: passFetchProgress)
|
||||||
} else {
|
} else {
|
||||||
contentSignal = .single(nil)
|
contentSignal = .single(nil)
|
||||||
originalMedia = nil
|
originalMedia = nil
|
||||||
|
@ -641,9 +641,13 @@ final class VideoInputScalePass: RenderPass {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func process(input: MTLTexture, secondInput: MTLTexture?, timestamp: CMTime, device: MTLDevice, commandBuffer: MTLCommandBuffer) -> MTLTexture? {
|
func process(input: MTLTexture, secondInput: MTLTexture?, timestamp: CMTime, device: MTLDevice, commandBuffer: MTLCommandBuffer) -> MTLTexture? {
|
||||||
|
#if targetEnvironment(simulator)
|
||||||
|
|
||||||
|
#else
|
||||||
guard max(input.width, input.height) > 1920 || secondInput != nil else {
|
guard max(input.width, input.height) > 1920 || secondInput != nil else {
|
||||||
return input
|
return input
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
let scaledSize = CGSize(width: input.width, height: input.height).fitted(CGSize(width: 1920.0, height: 1920.0))
|
let scaledSize = CGSize(width: input.width, height: input.height).fitted(CGSize(width: 1920.0, height: 1920.0))
|
||||||
let width: Int
|
let width: Int
|
||||||
@ -691,8 +695,11 @@ final class VideoInputScalePass: RenderPass {
|
|||||||
|
|
||||||
renderCommandEncoder.setRenderPipelineState(self.mainPipelineState!)
|
renderCommandEncoder.setRenderPipelineState(self.mainPipelineState!)
|
||||||
|
|
||||||
let (mainVideoState, additionalVideoState, transitionVideoState) = self.transitionState(for: timestamp, mainInput: input, additionalInput: secondInput)
|
#if targetEnvironment(simulator)
|
||||||
|
let secondInput = input
|
||||||
|
#endif
|
||||||
|
|
||||||
|
let (mainVideoState, additionalVideoState, transitionVideoState) = self.transitionState(for: timestamp, mainInput: input, additionalInput: secondInput)
|
||||||
|
|
||||||
if let transitionVideoState {
|
if let transitionVideoState {
|
||||||
self.encodeVideo(
|
self.encodeVideo(
|
||||||
|
@ -28,6 +28,7 @@ import CameraButtonComponent
|
|||||||
import UndoUI
|
import UndoUI
|
||||||
import ChatEntityKeyboardInputNode
|
import ChatEntityKeyboardInputNode
|
||||||
import ChatPresentationInterfaceState
|
import ChatPresentationInterfaceState
|
||||||
|
import TextFormat
|
||||||
|
|
||||||
enum DrawingScreenType {
|
enum DrawingScreenType {
|
||||||
case drawing
|
case drawing
|
||||||
@ -1862,25 +1863,25 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#if DEBUG
|
#if targetEnvironment(simulator)
|
||||||
// if case let .asset(asset) = subject, asset.mediaType == .video {
|
if case let .asset(asset) = subject, asset.mediaType == .video {
|
||||||
// let videoEntity = DrawingStickerEntity(content: .dualVideoReference)
|
let videoEntity = DrawingStickerEntity(content: .dualVideoReference)
|
||||||
// videoEntity.referenceDrawingSize = storyDimensions
|
videoEntity.referenceDrawingSize = storyDimensions
|
||||||
// videoEntity.scale = 1.49
|
videoEntity.scale = 1.49
|
||||||
// videoEntity.position = PIPPosition.bottomRight.getPosition(storyDimensions)
|
videoEntity.position = PIPPosition.bottomRight.getPosition(storyDimensions)
|
||||||
// self.entitiesView.add(videoEntity, announce: false)
|
self.entitiesView.add(videoEntity, announce: false)
|
||||||
//
|
|
||||||
// mediaEditor.setAdditionalVideo("", positionChanges: [VideoPositionChange(additional: false, timestamp: 0.0), VideoPositionChange(additional: true, timestamp: 3.0)])
|
mediaEditor.setAdditionalVideo("", positionChanges: [VideoPositionChange(additional: false, timestamp: 0.0), VideoPositionChange(additional: true, timestamp: 3.0)])
|
||||||
// mediaEditor.setAdditionalVideoPosition(videoEntity.position, scale: videoEntity.scale, rotation: videoEntity.rotation)
|
mediaEditor.setAdditionalVideoPosition(videoEntity.position, scale: videoEntity.scale, rotation: videoEntity.rotation)
|
||||||
// if let entityView = self.entitiesView.getView(for: videoEntity.uuid) as? DrawingStickerEntityView {
|
if let entityView = self.entitiesView.getView(for: videoEntity.uuid) as? DrawingStickerEntityView {
|
||||||
// entityView.updated = { [weak videoEntity, weak self] in
|
entityView.updated = { [weak videoEntity, weak self] in
|
||||||
// if let self, let videoEntity {
|
if let self, let videoEntity {
|
||||||
// self.mediaEditor?.setAdditionalVideoPosition(videoEntity.position, scale: videoEntity.scale, rotation: videoEntity.rotation)
|
self.mediaEditor?.setAdditionalVideoPosition(videoEntity.position, scale: videoEntity.scale, rotation: videoEntity.rotation)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
self.gradientColorsDisposable = mediaEditor.gradientColors.start(next: { [weak self] colors in
|
self.gradientColorsDisposable = mediaEditor.gradientColors.start(next: { [weak self] colors in
|
||||||
if let self, let colors {
|
if let self, let colors {
|
||||||
@ -3103,6 +3104,9 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
|||||||
|
|
||||||
let privacy = privacy ?? self.state.privacy
|
let privacy = privacy ?? self.state.privacy
|
||||||
|
|
||||||
|
let text = self.getCaption().string
|
||||||
|
let mentions = generateTextEntities(text, enabledTypes: [.mention], currentEntities: []).map { (text as NSString).substring(with: NSRange(location: $0.range.lowerBound + 1, length: $0.range.upperBound - $0.range.lowerBound - 1)) }
|
||||||
|
|
||||||
let stateContext = ShareWithPeersScreen.StateContext(context: self.context, subject: .stories(editing: false), initialPeerIds: Set(privacy.privacy.additionallyIncludePeers))
|
let stateContext = ShareWithPeersScreen.StateContext(context: self.context, subject: .stories(editing: false), initialPeerIds: Set(privacy.privacy.additionallyIncludePeers))
|
||||||
let _ = (stateContext.ready |> filter { $0 } |> take(1) |> deliverOnMainQueue).start(next: { [weak self] _ in
|
let _ = (stateContext.ready |> filter { $0 } |> take(1) |> deliverOnMainQueue).start(next: { [weak self] _ in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -3117,6 +3121,7 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
|||||||
allowScreenshots: !privacy.isForwardingDisabled,
|
allowScreenshots: !privacy.isForwardingDisabled,
|
||||||
pin: privacy.pin,
|
pin: privacy.pin,
|
||||||
timeout: privacy.timeout,
|
timeout: privacy.timeout,
|
||||||
|
mentions: mentions,
|
||||||
stateContext: stateContext,
|
stateContext: stateContext,
|
||||||
completion: { [weak self] privacy, allowScreenshots, pin in
|
completion: { [weak self] privacy, allowScreenshots, pin in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
|
@ -9,6 +9,7 @@ import ComponentDisplayAdapters
|
|||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import AccountContext
|
import AccountContext
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
|
import Postbox
|
||||||
import MultilineTextComponent
|
import MultilineTextComponent
|
||||||
import SolidRoundedButtonComponent
|
import SolidRoundedButtonComponent
|
||||||
import PresentationDataUtils
|
import PresentationDataUtils
|
||||||
@ -31,6 +32,7 @@ final class ShareWithPeersScreenComponent: Component {
|
|||||||
let screenshot: Bool
|
let screenshot: Bool
|
||||||
let pin: Bool
|
let pin: Bool
|
||||||
let timeout: Int
|
let timeout: Int
|
||||||
|
let mentions: [String]
|
||||||
let categoryItems: [CategoryItem]
|
let categoryItems: [CategoryItem]
|
||||||
let optionItems: [OptionItem]
|
let optionItems: [OptionItem]
|
||||||
let completion: (EngineStoryPrivacy, Bool, Bool) -> Void
|
let completion: (EngineStoryPrivacy, Bool, Bool) -> Void
|
||||||
@ -43,6 +45,7 @@ final class ShareWithPeersScreenComponent: Component {
|
|||||||
screenshot: Bool,
|
screenshot: Bool,
|
||||||
pin: Bool,
|
pin: Bool,
|
||||||
timeout: Int,
|
timeout: Int,
|
||||||
|
mentions: [String],
|
||||||
categoryItems: [CategoryItem],
|
categoryItems: [CategoryItem],
|
||||||
optionItems: [OptionItem],
|
optionItems: [OptionItem],
|
||||||
completion: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void,
|
completion: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void,
|
||||||
@ -54,6 +57,7 @@ final class ShareWithPeersScreenComponent: Component {
|
|||||||
self.screenshot = screenshot
|
self.screenshot = screenshot
|
||||||
self.pin = pin
|
self.pin = pin
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
|
self.mentions = mentions
|
||||||
self.categoryItems = categoryItems
|
self.categoryItems = categoryItems
|
||||||
self.optionItems = optionItems
|
self.optionItems = optionItems
|
||||||
self.completion = completion
|
self.completion = completion
|
||||||
@ -79,6 +83,9 @@ final class ShareWithPeersScreenComponent: Component {
|
|||||||
if lhs.timeout != rhs.timeout {
|
if lhs.timeout != rhs.timeout {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if lhs.mentions != rhs.mentions {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if lhs.categoryItems != rhs.categoryItems {
|
if lhs.categoryItems != rhs.categoryItems {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -1522,17 +1529,126 @@ final class ShareWithPeersScreenComponent: Component {
|
|||||||
base = .nobody
|
base = .nobody
|
||||||
}
|
}
|
||||||
|
|
||||||
component.completion(
|
let proceed = {
|
||||||
EngineStoryPrivacy(
|
component.completion(
|
||||||
base: base,
|
EngineStoryPrivacy(
|
||||||
additionallyIncludePeers: self.selectedPeers
|
base: base,
|
||||||
),
|
additionallyIncludePeers: self.selectedPeers
|
||||||
self.selectedOptions.contains(.screenshot),
|
),
|
||||||
self.selectedOptions.contains(.pin)
|
self.selectedOptions.contains(.screenshot),
|
||||||
)
|
self.selectedOptions.contains(.pin)
|
||||||
|
)
|
||||||
|
|
||||||
controller.dismissAllTooltips()
|
controller.dismissAllTooltips()
|
||||||
controller.dismiss()
|
controller.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
let presentAlert: ([String]) -> Void = { usernames in
|
||||||
|
let usernamesString = String(usernames.map { "@\($0)" }.joined(separator: ", "))
|
||||||
|
let alertController = textAlertController(
|
||||||
|
context: component.context,
|
||||||
|
forceTheme: defaultDarkColorPresentationTheme,
|
||||||
|
title: "Privacy Restrictions",
|
||||||
|
text: "The privacy settings of your story will prevent some users you tagged (\( usernamesString )) from viewing it.",
|
||||||
|
actions: [
|
||||||
|
TextAlertAction(type: .defaultAction, title: "Proceed Anyway", action: {
|
||||||
|
proceed()
|
||||||
|
}),
|
||||||
|
TextAlertAction(type: .genericAction, title: "Cancel", action: {})
|
||||||
|
],
|
||||||
|
actionLayout: .vertical
|
||||||
|
)
|
||||||
|
controller.present(alertController, in: .window(.root))
|
||||||
|
}
|
||||||
|
|
||||||
|
func matchingUsername(user: TelegramUser, usernames: Set<String>) -> String? {
|
||||||
|
for username in user.usernames {
|
||||||
|
if usernames.contains(username.username) {
|
||||||
|
return username.username
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let username = user.username {
|
||||||
|
if usernames.contains(username) {
|
||||||
|
return username
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
let context = component.context
|
||||||
|
let selectedPeerIds = self.selectedPeers
|
||||||
|
|
||||||
|
if case .stories = component.stateContext.subject {
|
||||||
|
if component.mentions.isEmpty {
|
||||||
|
proceed()
|
||||||
|
} else if case .nobody = base {
|
||||||
|
if selectedPeerIds.isEmpty {
|
||||||
|
presentAlert(component.mentions)
|
||||||
|
} else {
|
||||||
|
let _ = (context.account.postbox.transaction { transaction in
|
||||||
|
var filteredMentions = Set(component.mentions)
|
||||||
|
for peerId in selectedPeerIds {
|
||||||
|
if let user = transaction.getPeer(peerId) as? TelegramUser, let username = matchingUsername(user: user, usernames: filteredMentions) {
|
||||||
|
filteredMentions.remove(username)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Array(filteredMentions)
|
||||||
|
}
|
||||||
|
|> deliverOnMainQueue).start(next: { mentions in
|
||||||
|
if mentions.isEmpty {
|
||||||
|
proceed()
|
||||||
|
} else {
|
||||||
|
presentAlert(mentions)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if case .contacts = base {
|
||||||
|
let _ = (context.engine.data.get(TelegramEngine.EngineData.Item.Contacts.List(includePresences: false))
|
||||||
|
|> map { contacts -> [String] in
|
||||||
|
var filteredMentions = Set(component.mentions)
|
||||||
|
let peers = contacts.peers
|
||||||
|
for peer in peers {
|
||||||
|
if selectedPeerIds.contains(peer.id) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if case let .user(user) = peer, let username = matchingUsername(user: user, usernames: filteredMentions) {
|
||||||
|
filteredMentions.remove(username)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Array(filteredMentions)
|
||||||
|
}
|
||||||
|
|> deliverOnMainQueue).start(next: { mentions in
|
||||||
|
if mentions.isEmpty {
|
||||||
|
proceed()
|
||||||
|
} else {
|
||||||
|
presentAlert(mentions)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if case .closeFriends = base {
|
||||||
|
let _ = (context.engine.data.get(TelegramEngine.EngineData.Item.Contacts.List(includePresences: false))
|
||||||
|
|> map { contacts -> [String] in
|
||||||
|
var filteredMentions = Set(component.mentions)
|
||||||
|
let peers = contacts.peers
|
||||||
|
for peer in peers {
|
||||||
|
if case let .user(user) = peer, user.flags.contains(.isCloseFriend), let username = matchingUsername(user: user, usernames: filteredMentions) {
|
||||||
|
filteredMentions.remove(username)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Array(filteredMentions)
|
||||||
|
}
|
||||||
|
|> deliverOnMainQueue).start(next: { mentions in
|
||||||
|
if mentions.isEmpty {
|
||||||
|
proceed()
|
||||||
|
} else {
|
||||||
|
presentAlert(mentions)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
proceed()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
proceed()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
@ -1821,6 +1937,7 @@ public class ShareWithPeersScreen: ViewControllerComponentContainer {
|
|||||||
allowScreenshots: Bool = true,
|
allowScreenshots: Bool = true,
|
||||||
pin: Bool = false,
|
pin: Bool = false,
|
||||||
timeout: Int = 0,
|
timeout: Int = 0,
|
||||||
|
mentions: [String] = [],
|
||||||
stateContext: StateContext,
|
stateContext: StateContext,
|
||||||
completion: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void,
|
completion: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void,
|
||||||
editCategory: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void
|
editCategory: @escaping (EngineStoryPrivacy, Bool, Bool) -> Void
|
||||||
@ -1921,6 +2038,7 @@ public class ShareWithPeersScreen: ViewControllerComponentContainer {
|
|||||||
screenshot: allowScreenshots,
|
screenshot: allowScreenshots,
|
||||||
pin: pin,
|
pin: pin,
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
|
mentions: mentions,
|
||||||
categoryItems: categoryItems,
|
categoryItems: categoryItems,
|
||||||
optionItems: optionItems,
|
optionItems: optionItems,
|
||||||
completion: completion,
|
completion: completion,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user