mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
51512ad436
commit
8fece7c49a
@ -237,7 +237,7 @@ private final class QuickShareToastScreenComponent: Component {
|
||||
transition: .immediate,
|
||||
component: AnyComponent(PlainButtonComponent(
|
||||
content: AnyComponent(MultilineTextComponent(
|
||||
text: .plain(NSAttributedString(string: "Undo", font: Font.regular(17.0), textColor: environment.theme.list.itemAccentColor.withMultiplied(hue: 0.933, saturation: 0.61, brightness: 1.0)))
|
||||
text: .plain(NSAttributedString(string: component.peer.id != component.context.account.peerId ? environment.strings.Undo_Undo : "", font: Font.regular(17.0), textColor: environment.theme.list.itemAccentColor.withMultiplied(hue: 0.933, saturation: 0.61, brightness: 1.0)))
|
||||
)),
|
||||
effectAlignment: .center,
|
||||
contentInsets: UIEdgeInsets(top: -8.0, left: -8.0, bottom: -8.0, right: -8.0),
|
||||
@ -267,7 +267,7 @@ private final class QuickShareToastScreenComponent: Component {
|
||||
linkAttribute: { _ in return nil })
|
||||
))),
|
||||
environment: {},
|
||||
containerSize: CGSize(width: availableContentSize.width - contentInsets.left - contentInsets.right - spacing - iconSize.width - 16.0, height: availableContentSize.height)
|
||||
containerSize: CGSize(width: availableContentSize.width - contentInsets.left - contentInsets.right - spacing - iconSize.width - actionButtonSize.width - 16.0 - 4.0, height: availableContentSize.height)
|
||||
)
|
||||
|
||||
var contentHeight: CGFloat = 0.0
|
||||
|
@ -28,8 +28,6 @@ func metalLibrary(device: MTLDevice) -> MTLLibrary? {
|
||||
return library
|
||||
}
|
||||
|
||||
|
||||
|
||||
final class StoryBlobLayer: MetalEngineSubjectLayer, MetalEngineSubject {
|
||||
var internalData: MetalEngineSubjectInternalData?
|
||||
|
||||
|
@ -5755,6 +5755,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
displayedPeerVerification = .single(false)
|
||||
}
|
||||
|
||||
let globalPrivacySettings = context.engine.data.get(TelegramEngine.EngineData.Item.Configuration.GlobalPrivacy())
|
||||
|
||||
self.peerDisposable.set(combineLatest(
|
||||
queue: Queue.mainQueue(),
|
||||
peerView.get(),
|
||||
@ -5769,8 +5771,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
isPremiumRequiredForMessaging,
|
||||
managingBot,
|
||||
adMessage,
|
||||
displayedPeerVerification
|
||||
).startStrict(next: { [weak self] peerView, globalNotificationSettings, onlineMemberCount, hasScheduledMessages, peerReportNotice, pinnedCount, threadInfo, hasSearchTags, hasSavedChats, isPremiumRequiredForMessaging, managingBot, adMessage, displayedPeerVerification in
|
||||
displayedPeerVerification,
|
||||
globalPrivacySettings
|
||||
).startStrict(next: { [weak self] peerView, globalNotificationSettings, onlineMemberCount, hasScheduledMessages, peerReportNotice, pinnedCount, threadInfo, hasSearchTags, hasSavedChats, isPremiumRequiredForMessaging, managingBot, adMessage, displayedPeerVerification, globalPrivacySettings in
|
||||
if let strongSelf = self {
|
||||
if strongSelf.peerView === peerView && strongSelf.reportIrrelvantGeoNotice == peerReportNotice && strongSelf.hasScheduledMessages == hasScheduledMessages && strongSelf.threadInfo == threadInfo && strongSelf.presentationInterfaceState.hasSearchTags == hasSearchTags && strongSelf.presentationInterfaceState.hasSavedChats == hasSavedChats && strongSelf.presentationInterfaceState.isPremiumRequiredForMessaging == isPremiumRequiredForMessaging && managingBot == strongSelf.presentationInterfaceState.contactStatus?.managingBot && adMessage?.id == strongSelf.presentationInterfaceState.adMessage?.id {
|
||||
return
|
||||
@ -5869,6 +5872,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
var contactStatus: ChatContactStatus?
|
||||
var businessIntro: TelegramBusinessIntro?
|
||||
var sendPaidMessageStars: StarsAmount?
|
||||
var alwaysShowGiftButton = false
|
||||
var disallowedGifts: TelegramDisallowedGifts?
|
||||
if let peer = peerView.peers[peerView.peerId] {
|
||||
if let cachedData = peerView.cachedData as? CachedUserData {
|
||||
contactStatus = ChatContactStatus(canAddContact: !peerView.peerIsContact, canReportIrrelevantLocation: false, peerStatusSettings: cachedData.peerStatusSettings, invitedBy: nil, managingBot: managingBot)
|
||||
@ -5878,6 +5883,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
if case let .peer(peerId) = chatLocation, peerId.namespace == Namespaces.Peer.SecretChat {
|
||||
} else {
|
||||
sendPaidMessageStars = cachedData.sendPaidMessageStars
|
||||
if cachedData.disallowedGifts != .All {
|
||||
alwaysShowGiftButton = globalPrivacySettings.displayGiftButton || cachedData.flags.contains(.displayGiftButton)
|
||||
}
|
||||
disallowedGifts = cachedData.disallowedGifts
|
||||
}
|
||||
} else if let cachedData = peerView.cachedData as? CachedGroupData {
|
||||
var invitedBy: Peer?
|
||||
@ -6113,6 +6122,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
.updatedHasSearchTags(hasSearchTags)
|
||||
.updatedIsPremiumRequiredForMessaging(isPremiumRequiredForMessaging)
|
||||
.updatedSendPaidMessageStars(sendPaidMessageStars)
|
||||
.updatedAlwaysShowGiftButton(alwaysShowGiftButton)
|
||||
.updatedDisallowedGifts(disallowedGifts)
|
||||
.updatedHasSavedChats(hasSavedChats)
|
||||
.updatedAppliedBoosts(appliedBoosts)
|
||||
.updatedBoostsToUnrestrict(boostsToUnrestrict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user