mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Version 11.9
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Foundation
|
||||
import SGSimpleSettings
|
||||
import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
@@ -441,7 +442,14 @@ public final class ShareController: ViewController {
|
||||
|
||||
public var parentNavigationController: NavigationController?
|
||||
|
||||
public convenience init(context: AccountContext, subject: ShareControllerSubject, presetText: String? = nil, preferredAction: ShareControllerPreferredAction = .default, showInChat: ((Message) -> Void)? = nil, fromForeignApp: Bool = false, segmentedValues: [ShareControllerSegmentedValue]? = nil, externalShare: Bool = true, immediateExternalShare: Bool = false, switchableAccounts: [AccountWithInfo] = [], immediatePeerId: PeerId? = nil, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)? = nil, forceTheme: PresentationTheme? = nil, forcedActionTitle: String? = nil, shareAsLink: Bool = false, collectibleItemInfo: TelegramCollectibleItemInfo? = nil) {
|
||||
public convenience init(context: AccountContext, subject: ShareControllerSubject, presetText: String? = nil, preferredAction: ShareControllerPreferredAction = .default, showInChat: ((Message) -> Void)? = nil, fromForeignApp: Bool = false, segmentedValues: [ShareControllerSegmentedValue]? = nil, externalShare: Bool = true, immediateExternalShare: Bool = false, immediateExternalShareOverridingSGBehaviour: Bool? = nil, switchableAccounts: [AccountWithInfo] = [], immediatePeerId: PeerId? = nil, updatedPresentationData: (initial: PresentationData, signal: Signal<PresentationData, NoError>)? = nil, forceTheme: PresentationTheme? = nil, forcedActionTitle: String? = nil, shareAsLink: Bool = false, collectibleItemInfo: TelegramCollectibleItemInfo? = nil) {
|
||||
var immediateExternalShare = immediateExternalShare
|
||||
if SGSimpleSettings.shared.forceSystemSharing {
|
||||
immediateExternalShare = true
|
||||
}
|
||||
if let immediateExternalShareOverridingSGBehaviour = immediateExternalShareOverridingSGBehaviour {
|
||||
immediateExternalShare = immediateExternalShareOverridingSGBehaviour
|
||||
}
|
||||
self.init(
|
||||
environment: ShareControllerAppEnvironment(sharedContext: context.sharedContext),
|
||||
currentContext: ShareControllerAppAccountContext(context: context),
|
||||
@@ -1048,7 +1056,7 @@ public final class ShareController: ViewController {
|
||||
var restrictedText: String?
|
||||
for attribute in message.attributes {
|
||||
if let attribute = attribute as? RestrictedContentMessageAttribute {
|
||||
restrictedText = attribute.platformText(platform: "ios", contentSettings: strongSelf.currentContext.contentSettings) ?? ""
|
||||
restrictedText = attribute.platformText(platform: "ios", contentSettings: strongSelf.currentContext.contentSettings, chatId: message.author?.id.id._internalGetInt64Value()) ?? ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user