mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various improvements
This commit is contained in:
@@ -20,7 +20,7 @@ import StickerResources
|
||||
import AppBundle
|
||||
import ContextUI
|
||||
import PremiumUI
|
||||
import StickerPackPreviewUI
|
||||
import StickerPeekUI
|
||||
import UndoUI
|
||||
import AudioToolbox
|
||||
import SolidRoundedButtonComponent
|
||||
@@ -457,12 +457,12 @@ public final class EmojiPagerContentComponent: Component {
|
||||
}
|
||||
}
|
||||
|
||||
final class ItemPlaceholderView: UIView {
|
||||
public final class ItemPlaceholderView: UIView {
|
||||
private let shimmerView: PortalSourceView?
|
||||
private var placeholderView: PortalView?
|
||||
private let placeholderMaskLayer: SimpleLayer
|
||||
|
||||
init(
|
||||
public init(
|
||||
context: AccountContext,
|
||||
file: TelegramMediaFile,
|
||||
shimmerView: PortalSourceView?,
|
||||
@@ -503,7 +503,7 @@ public final class EmojiPagerContentComponent: Component {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
func update(size: CGSize) {
|
||||
public func update(size: CGSize) {
|
||||
if let placeholderView = self.placeholderView {
|
||||
placeholderView.view.frame = CGRect(origin: CGPoint(), size: size)
|
||||
}
|
||||
@@ -511,11 +511,21 @@ public final class EmojiPagerContentComponent: Component {
|
||||
}
|
||||
}
|
||||
|
||||
final class ItemLayer: MultiAnimationRenderTarget {
|
||||
struct Key: Hashable {
|
||||
public final class ItemLayer: MultiAnimationRenderTarget {
|
||||
public struct Key: Hashable {
|
||||
var groupId: AnyHashable
|
||||
var fileId: MediaId?
|
||||
var staticEmoji: String?
|
||||
|
||||
public init(
|
||||
groupId: AnyHashable,
|
||||
fileId: MediaId?,
|
||||
staticEmoji: String?
|
||||
) {
|
||||
self.groupId = groupId
|
||||
self.fileId = fileId
|
||||
self.staticEmoji = staticEmoji
|
||||
}
|
||||
}
|
||||
|
||||
let item: Item
|
||||
@@ -536,10 +546,10 @@ public final class EmojiPagerContentComponent: Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
private(set) var displayPlaceholder: Bool = false
|
||||
let onUpdateDisplayPlaceholder: (Bool) -> Void
|
||||
public private(set) var displayPlaceholder: Bool = false
|
||||
public let onUpdateDisplayPlaceholder: (Bool) -> Void
|
||||
|
||||
init(
|
||||
public init(
|
||||
item: Item,
|
||||
context: AccountContext,
|
||||
groupId: String,
|
||||
@@ -696,7 +706,7 @@ public final class EmojiPagerContentComponent: Component {
|
||||
self.fetchDisposable?.dispose()
|
||||
}
|
||||
|
||||
override public func action(forKey event: String) -> CAAction? {
|
||||
public override func action(forKey event: String) -> CAAction? {
|
||||
if event == kCAOnOrderIn {
|
||||
self.isInHierarchyValue = true
|
||||
} else if event == kCAOnOrderOut {
|
||||
@@ -712,7 +722,7 @@ public final class EmojiPagerContentComponent: Component {
|
||||
self.shouldBeAnimating = shouldBePlaying
|
||||
}
|
||||
|
||||
override func updateDisplayPlaceholder(displayPlaceholder: Bool) {
|
||||
public override func updateDisplayPlaceholder(displayPlaceholder: Bool) {
|
||||
if self.displayPlaceholder == displayPlaceholder {
|
||||
return
|
||||
}
|
||||
@@ -943,7 +953,7 @@ public final class EmojiPagerContentComponent: Component {
|
||||
switch attribute {
|
||||
case let .CustomEmoji(_, _, packReference):
|
||||
if let packReference = packReference {
|
||||
let controller = StickerPackScreen(context: context, updatedPresentationData: nil, mainStickerPack: packReference, stickerPacks: [packReference], parentNavigationController: component.inputInteraction.navigationController(), sendSticker: { file, sourceView, sourceRect in
|
||||
let controller = context.sharedContext.makeStickerPackScreen(context: context, updatedPresentationData: nil, mainStickerPack: packReference, stickerPacks: [packReference], parentNavigationController: component.inputInteraction.navigationController(), sendSticker: { file, sourceView, sourceRect in
|
||||
//return component.inputInteraction.sendSticker(file, false, false, nil, false, sourceNode, sourceRect, nil)
|
||||
return false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user