mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 03:21:29 +00:00
Various fixes
This commit is contained in:
parent
cb1f5058a7
commit
f6e28fc44e
@ -176,6 +176,8 @@ public final class MultilineTextComponent: Component {
|
|||||||
|
|
||||||
if let tintColor = component.tintColor {
|
if let tintColor = component.tintColor {
|
||||||
transition.setTintColor(layer: self.layer, color: tintColor)
|
transition.setTintColor(layer: self.layer, color: tintColor)
|
||||||
|
} else {
|
||||||
|
self.layer.layerTintColor = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return size
|
return size
|
||||||
|
|||||||
@ -210,7 +210,7 @@ public class BoxedMessage: NSObject {
|
|||||||
|
|
||||||
public class Serialization: NSObject, MTSerialization {
|
public class Serialization: NSObject, MTSerialization {
|
||||||
public func currentLayer() -> UInt {
|
public func currentLayer() -> UInt {
|
||||||
return 214
|
return 215
|
||||||
}
|
}
|
||||||
|
|
||||||
public func parseMessage(_ data: Data!) -> Any! {
|
public func parseMessage(_ data: Data!) -> Any! {
|
||||||
|
|||||||
@ -662,15 +662,18 @@ private final class GiftViewSheetContent: CombinedComponent {
|
|||||||
controller.push(introController)
|
controller.push(introController)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var isOpeningValue = false
|
||||||
func openValue() {
|
func openValue() {
|
||||||
guard let controller = self.getController(), let gift = self.subject.arguments?.gift, case let .unique(uniqueGift) = gift else {
|
guard let controller = self.getController(), let gift = self.subject.arguments?.gift, case let .unique(uniqueGift) = gift, !self.isOpeningValue else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.isOpeningValue = true
|
||||||
let _ = (self.context.engine.payments.getUniqueStarGiftValueInfo(slug: uniqueGift.slug)
|
let _ = (self.context.engine.payments.getUniqueStarGiftValueInfo(slug: uniqueGift.slug)
|
||||||
|> deliverOnMainQueue).start(next: { [weak self] valueInfo in
|
|> deliverOnMainQueue).start(next: { [weak self] valueInfo in
|
||||||
guard let self, let valueInfo else {
|
guard let self, let valueInfo else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.isOpeningValue = false
|
||||||
let valueController = GiftValueScreen(context: self.context, gift: gift, valueInfo: valueInfo)
|
let valueController = GiftValueScreen(context: self.context, gift: gift, valueInfo: valueInfo)
|
||||||
controller.push(valueController)
|
controller.push(valueController)
|
||||||
})
|
})
|
||||||
@ -2621,8 +2624,8 @@ private final class GiftViewSheetContent: CombinedComponent {
|
|||||||
textColor = vibrantColor.mixedWith(UIColor.white, alpha: 0.4)
|
textColor = vibrantColor.mixedWith(UIColor.white, alpha: 0.4)
|
||||||
} else {
|
} else {
|
||||||
textColor = vibrantColor
|
textColor = vibrantColor
|
||||||
|
useDescriptionTint = true
|
||||||
}
|
}
|
||||||
useDescriptionTint = true
|
|
||||||
} else {
|
} else {
|
||||||
textFont = soldOut ? Font.medium(15.0) : Font.regular(15.0)
|
textFont = soldOut ? Font.medium(15.0) : Font.regular(15.0)
|
||||||
textColor = soldOut ? theme.list.itemDestructiveColor : theme.list.itemPrimaryTextColor
|
textColor = soldOut ? theme.list.itemDestructiveColor : theme.list.itemPrimaryTextColor
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user