mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Various fixes
This commit is contained in:
parent
1b66f573c7
commit
42e2576dce
@ -1074,7 +1074,7 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
||||
self?.switchToAnotherAccount?()
|
||||
}, debugAction: { [weak self] in
|
||||
self?.debugAction?()
|
||||
}, extendedInitialReveal: self.presetText != nil, segmentedValues: self.segmentedValues)
|
||||
}, extendedInitialReveal: self.presetText != nil, segmentedValues: self.segmentedValues, fromPublicChannel: self.fromPublicChannel)
|
||||
self.peersContentNode = peersContentNode
|
||||
peersContentNode.openSearch = { [weak self] in
|
||||
let _ = (_internal_recentlySearchedPeers(postbox: context.stateManager.postbox)
|
||||
|
@ -145,7 +145,7 @@ final class SharePeersContainerNode: ASDisplayNode, ShareContentContainerNode {
|
||||
}
|
||||
private let tick = ValuePromise<Int>(0)
|
||||
|
||||
init(environment: ShareControllerEnvironment, context: ShareControllerAccountContext, switchableAccounts: [ShareControllerSwitchableAccount], theme: PresentationTheme, strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, peers: [(EngineRenderedPeer, EnginePeer.Presence?)], accountPeer: EnginePeer, controllerInteraction: ShareControllerInteraction, externalShare: Bool, switchToAnotherAccount: @escaping () -> Void, debugAction: @escaping () -> Void, extendedInitialReveal: Bool, segmentedValues: [ShareControllerSegmentedValue]?) {
|
||||
init(environment: ShareControllerEnvironment, context: ShareControllerAccountContext, switchableAccounts: [ShareControllerSwitchableAccount], theme: PresentationTheme, strings: PresentationStrings, nameDisplayOrder: PresentationPersonNameOrder, peers: [(EngineRenderedPeer, EnginePeer.Presence?)], accountPeer: EnginePeer, controllerInteraction: ShareControllerInteraction, externalShare: Bool, switchToAnotherAccount: @escaping () -> Void, debugAction: @escaping () -> Void, extendedInitialReveal: Bool, segmentedValues: [ShareControllerSegmentedValue]?, fromPublicChannel: Bool) {
|
||||
self.environment = environment
|
||||
self.context = context
|
||||
self.theme = theme
|
||||
@ -170,7 +170,7 @@ final class SharePeersContainerNode: ASDisplayNode, ShareContentContainerNode {
|
||||
var index: Int32 = 0
|
||||
|
||||
if canShareStory {
|
||||
entries.append(SharePeerEntry(index: index, item: .story(isMessage: false), theme: theme, strings: strings))
|
||||
entries.append(SharePeerEntry(index: index, item: .story(isMessage: fromPublicChannel), theme: theme, strings: strings))
|
||||
index += 1
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public struct UserLimitsConfiguration: Equatable {
|
||||
maxStoriesSuggestedReactions: 1,
|
||||
maxGiveawayChannelsCount: 10,
|
||||
maxGiveawayCountriesCount: 10,
|
||||
maxGiveawayPeriodSeconds: 86400 * 7,
|
||||
maxGiveawayPeriodSeconds: 86400 * 31,
|
||||
maxChannelRecommendationsCount: 10
|
||||
)
|
||||
}
|
||||
|
@ -2087,6 +2087,8 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
||||
private var presentationData: PresentationData
|
||||
private var validLayout: ContainerViewLayout?
|
||||
|
||||
private let readyValue = Promise<Bool>()
|
||||
|
||||
init(controller: MediaEditorScreen) {
|
||||
self.controller = controller
|
||||
self.context = controller.context
|
||||
@ -2360,6 +2362,11 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
||||
}
|
||||
}
|
||||
|
||||
if case .message = subject {
|
||||
} else {
|
||||
self.readyValue.set(.single(true))
|
||||
}
|
||||
|
||||
if case let .image(_, _, additionalImage, position) = subject, let additionalImage {
|
||||
let image = generateImage(CGSize(width: additionalImage.size.width, height: additionalImage.size.width), contextGenerator: { size, context in
|
||||
let bounds = CGRect(origin: .zero, size: size)
|
||||
@ -2422,9 +2429,10 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
||||
messageEntity.scale = 3.3 * fraction
|
||||
|
||||
self.entitiesView.add(messageEntity, announce: false)
|
||||
})
|
||||
})
|
||||
|
||||
self.readyValue.set(.single(true))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
self.gradientColorsDisposable = mediaEditor.gradientColors.start(next: { [weak self] colors in
|
||||
@ -4088,8 +4096,15 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
||||
controller.presentationContext.containerLayoutUpdated(layout, transition: transition.containedViewLayoutTransition)
|
||||
|
||||
if isFirstTime {
|
||||
self.isHidden = true
|
||||
let _ = (self.readyValue.get()
|
||||
|> take(1)).start(next: { [weak self] _ in
|
||||
if let self {
|
||||
self.isHidden = false
|
||||
self.animateIn()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2432,7 +2432,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
Queue.mainQueue().after(0.1) {
|
||||
Queue.mainQueue().after(0.05) {
|
||||
self.openStorySharing(messages: messages)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user