mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Various fixes
This commit is contained in:
parent
cc7fc32ab1
commit
8f70aa3957
@ -172,7 +172,7 @@ final class HashtagSearchNavigationContentNode: NavigationBarContentNode {
|
||||
containerSize: CGSize(width: size.width, height: 44.0)
|
||||
)
|
||||
let tabSelectorFrameOriginX = floorToScreenPixels((size.width - tabSelectorSize.width) / 2.0)
|
||||
let tabSelectorFrame = CGRect(origin: CGPoint(x: tabSelectorFrameOriginX, y: size.height - tabSelectorSize.height - 9.0), size: tabSelectorSize)
|
||||
let tabSelectorFrame = CGRect(origin: CGPoint(x: tabSelectorFrameOriginX, y: size.height - tabSelectorSize.height - 10.0), size: tabSelectorSize)
|
||||
if let tabSelectorView = self.tabSelector.view {
|
||||
if tabSelectorView.superview == nil {
|
||||
self.view.addSubview(tabSelectorView)
|
||||
|
@ -105,7 +105,7 @@ final class ItemListControllerTabsContentNode: NavigationBarContentNode {
|
||||
environment: {},
|
||||
containerSize: CGSize(width: size.width, height: 44.0)
|
||||
)
|
||||
let tabSelectorFrame = CGRect(origin: CGPoint(x: floor((size.width - tabSelectorSize.width) / 2.0), y: floor((size.height - tabSelectorSize.height) / 2.0) + 4.0), size: tabSelectorSize)
|
||||
let tabSelectorFrame = CGRect(origin: CGPoint(x: floor((size.width - tabSelectorSize.width) / 2.0), y: floor((size.height - tabSelectorSize.height) / 2.0) + 3.0), size: tabSelectorSize)
|
||||
if let tabSelectorView = self.tabSelector.view {
|
||||
if tabSelectorView.superview == nil {
|
||||
self.view.addSubview(tabSelectorView)
|
||||
|
@ -250,7 +250,7 @@ public final class ProfileSavedMusicContext {
|
||||
}))
|
||||
}
|
||||
|
||||
public func reorderMusic(file: FileMediaReference, file: FileMediaReference?) -> Signal<Never, NoError> {
|
||||
public func reorderMusic(file: FileMediaReference, afterFile: FileMediaReference?) -> Signal<Never, NoError> {
|
||||
return .complete()
|
||||
}
|
||||
|
||||
|
@ -667,7 +667,7 @@ public class ChatMessageGiftBubbleContentNode: ChatMessageBubbleContentNode {
|
||||
authorName = item.message.author.flatMap { EnginePeer($0) }?.compactDisplayTitle ?? ""
|
||||
}
|
||||
if isSelfGift {
|
||||
title = item.presentationData.strings.Notification_StarGift_Self_Title
|
||||
title = isStoryEntity ? uniqueGift.title : item.presentationData.strings.Notification_StarGift_Self_Title
|
||||
} else if item.message.id.peerId.isTelegramNotifications {
|
||||
title = item.presentationData.strings.Notification_StarGift_TitleShort
|
||||
} else {
|
||||
|
@ -3996,10 +3996,12 @@ public class GiftViewScreen: ViewControllerComponentContainer {
|
||||
switch action.action {
|
||||
case let .starGift(gift, convertStars, text, entities, nameHidden, savedToProfile, converted, upgraded, canUpgrade, upgradeStars, isRefunded, _, upgradeMessageId, peerId, senderId, savedId, prepaidUpgradeHash, giftMessageId):
|
||||
var reference: StarGiftReference
|
||||
if let peerId, let savedId {
|
||||
if let peerId, let giftMessageId {
|
||||
reference = .message(messageId: EngineMessage.Id(peerId: peerId, namespace: Namespaces.Message.Cloud, id: giftMessageId))
|
||||
} else if let peerId, let savedId {
|
||||
reference = .peer(peerId: peerId, id: savedId)
|
||||
} else {
|
||||
reference = .message(messageId: giftMessageId.flatMap { EngineMessage.Id(peerId: message.id.peerId, namespace: message.id.namespace, id: $0) } ?? message.id)
|
||||
reference = .message(messageId: message.id)
|
||||
}
|
||||
return (message.id.peerId, senderId ?? message.author?.id, message.author?.compactDisplayTitle, message.id, reference, message.flags.contains(.Incoming), gift, message.timestamp, convertStars, text, entities, nameHidden, savedToProfile, nil, converted, upgraded, isRefunded, canUpgrade, upgradeStars, nil, nil, nil, upgradeMessageId, nil, nil, prepaidUpgradeHash)
|
||||
case let .starGiftUnique(gift, isUpgrade, isTransferred, savedToProfile, canExportDate, transferStars, _, _, peerId, senderId, savedId, _, canTransferDate, canResaleDate):
|
||||
|
@ -611,7 +611,7 @@ public final class TabSelectorComponent: Component {
|
||||
}
|
||||
|
||||
let itemSize = itemView.title.update(
|
||||
transition: .immediate,
|
||||
transition: itemTransition,
|
||||
component: AnyComponent(ItemComponent(
|
||||
context: component.context,
|
||||
content: item.content,
|
||||
@ -736,7 +736,7 @@ public final class TabSelectorComponent: Component {
|
||||
}
|
||||
|
||||
var mappedSelectionFrame = effectiveBackgroundRect.insetBy(dx: innerInset, dy: 0.0)
|
||||
mappedSelectionFrame.origin.y = mappedSelectionFrame.maxY + 6.0
|
||||
mappedSelectionFrame.origin.y = mappedSelectionFrame.maxY + 7.0
|
||||
mappedSelectionFrame.size.height = 3.0
|
||||
transition.setPosition(view: self.selectionView, position: mappedSelectionFrame.center)
|
||||
transition.setBounds(view: self.selectionView, bounds: CGRect(origin: CGPoint(), size: mappedSelectionFrame.size))
|
||||
|
Loading…
x
Reference in New Issue
Block a user