mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Animation and theme improvements
This commit is contained in:
parent
1fdf09cbda
commit
2af9c675a7
@ -150,8 +150,7 @@ final class ChatListTitleView: UIView, NavigationBarTitleView, NavigationBarTitl
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.openStatusSetup?(titleCredibilityIconView)
|
strongSelf.openStatusSetup?(titleCredibilityIconView)
|
||||||
},
|
}
|
||||||
longTapAction: nil
|
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 22.0, height: 22.0)
|
containerSize: CGSize(width: 22.0, height: 22.0)
|
||||||
@ -379,8 +378,7 @@ final class ChatListTitleView: UIView, NavigationBarTitleView, NavigationBarTitl
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.openStatusSetup?(titleCredibilityIconView)
|
strongSelf.openStatusSetup?(titleCredibilityIconView)
|
||||||
},
|
}
|
||||||
longTapAction: nil
|
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 22.0, height: 22.0)
|
containerSize: CGSize(width: 22.0, height: 22.0)
|
||||||
|
|||||||
@ -2073,8 +2073,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
animationRenderer: item.interaction.animationRenderer,
|
animationRenderer: item.interaction.animationRenderer,
|
||||||
content: currentCredibilityIconContent,
|
content: currentCredibilityIconContent,
|
||||||
isVisibleForAnimations: strongSelf.visibilityStatus,
|
isVisibleForAnimations: strongSelf.visibilityStatus,
|
||||||
action: nil,
|
action: nil
|
||||||
longTapAction: nil
|
|
||||||
)
|
)
|
||||||
strongSelf.credibilityIconComponent = credibilityIconComponent
|
strongSelf.credibilityIconComponent = credibilityIconComponent
|
||||||
|
|
||||||
|
|||||||
@ -1026,7 +1026,6 @@ public class ContactsPeerItemNode: ItemListRevealOptionsItemNode {
|
|||||||
content: credibilityIcon,
|
content: credibilityIcon,
|
||||||
isVisibleForAnimations: strongSelf.visibilityStatus,
|
isVisibleForAnimations: strongSelf.visibilityStatus,
|
||||||
action: nil,
|
action: nil,
|
||||||
longTapAction: nil,
|
|
||||||
emojiFileUpdated: nil
|
emojiFileUpdated: nil
|
||||||
)
|
)
|
||||||
strongSelf.credibilityIconComponent = credibilityIconComponent
|
strongSelf.credibilityIconComponent = credibilityIconComponent
|
||||||
|
|||||||
@ -1124,7 +1124,6 @@ public class ItemListPeerItemNode: ItemListRevealOptionsItemNode, ItemListItemNo
|
|||||||
content: credibilityIcon,
|
content: credibilityIcon,
|
||||||
isVisibleForAnimations: strongSelf.visibilityStatus,
|
isVisibleForAnimations: strongSelf.visibilityStatus,
|
||||||
action: nil,
|
action: nil,
|
||||||
longTapAction: nil,
|
|
||||||
emojiFileUpdated: nil
|
emojiFileUpdated: nil
|
||||||
)
|
)
|
||||||
strongSelf.credibilityIconComponent = credibilityIconComponent
|
strongSelf.credibilityIconComponent = credibilityIconComponent
|
||||||
|
|||||||
@ -151,8 +151,7 @@ class EmojiHeaderComponent: Component {
|
|||||||
loopMode: .forever
|
loopMode: .forever
|
||||||
),
|
),
|
||||||
isVisibleForAnimations: true,
|
isVisibleForAnimations: true,
|
||||||
action: nil,
|
action: nil
|
||||||
longTapAction: nil
|
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 96.0, height: 96.0)
|
containerSize: CGSize(width: 96.0, height: 96.0)
|
||||||
|
|||||||
@ -291,7 +291,9 @@ public class ItemListReactionItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
context: item.context,
|
context: item.context,
|
||||||
animationCache: item.context.animationCache,
|
animationCache: item.context.animationCache,
|
||||||
animationRenderer: item.context.animationRenderer,
|
animationRenderer: item.context.animationRenderer,
|
||||||
content: .animation(content: animationContent, size: iconBoundingSize, placeholderColor: item.presentationData.theme.list.mediaPlaceholderColor, themeColor: item.presentationData.theme.list.itemAccentColor, loopMode: .forever), isVisibleForAnimations: true, action: nil, longTapAction: nil
|
content: .animation(content: animationContent, size: iconBoundingSize, placeholderColor: item.presentationData.theme.list.mediaPlaceholderColor, themeColor: item.presentationData.theme.list.itemAccentColor, loopMode: .forever),
|
||||||
|
isVisibleForAnimations: true,
|
||||||
|
action: nil
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: iconBoundingSize
|
containerSize: iconBoundingSize
|
||||||
|
|||||||
@ -1036,7 +1036,6 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode {
|
|||||||
content: credibilityIcon,
|
content: credibilityIcon,
|
||||||
isVisibleForAnimations: true,
|
isVisibleForAnimations: true,
|
||||||
action: nil,
|
action: nil,
|
||||||
longTapAction: nil,
|
|
||||||
emojiFileUpdated: nil
|
emojiFileUpdated: nil
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
|
|||||||
@ -52,7 +52,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
public let content: Content
|
public let content: Content
|
||||||
public let isVisibleForAnimations: Bool
|
public let isVisibleForAnimations: Bool
|
||||||
public let action: (() -> Void)?
|
public let action: (() -> Void)?
|
||||||
public let longTapAction: (() -> Void)?
|
|
||||||
public let emojiFileUpdated: ((TelegramMediaFile?) -> Void)?
|
public let emojiFileUpdated: ((TelegramMediaFile?) -> Void)?
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
@ -62,7 +61,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
content: Content,
|
content: Content,
|
||||||
isVisibleForAnimations: Bool,
|
isVisibleForAnimations: Bool,
|
||||||
action: (() -> Void)?,
|
action: (() -> Void)?,
|
||||||
longTapAction: (() -> Void)?,
|
|
||||||
emojiFileUpdated: ((TelegramMediaFile?) -> Void)? = nil
|
emojiFileUpdated: ((TelegramMediaFile?) -> Void)? = nil
|
||||||
) {
|
) {
|
||||||
self.context = context
|
self.context = context
|
||||||
@ -71,7 +69,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
self.content = content
|
self.content = content
|
||||||
self.isVisibleForAnimations = isVisibleForAnimations
|
self.isVisibleForAnimations = isVisibleForAnimations
|
||||||
self.action = action
|
self.action = action
|
||||||
self.longTapAction = longTapAction
|
|
||||||
self.emojiFileUpdated = emojiFileUpdated
|
self.emojiFileUpdated = emojiFileUpdated
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +80,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
content: self.content,
|
content: self.content,
|
||||||
isVisibleForAnimations: isVisibleForAnimations,
|
isVisibleForAnimations: isVisibleForAnimations,
|
||||||
action: self.action,
|
action: self.action,
|
||||||
longTapAction: self.longTapAction,
|
|
||||||
emojiFileUpdated: self.emojiFileUpdated
|
emojiFileUpdated: self.emojiFileUpdated
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -157,7 +153,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
self.layer.addSublayer(self.hierarchyTrackingLayer)
|
self.layer.addSublayer(self.hierarchyTrackingLayer)
|
||||||
|
|
||||||
self.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:))))
|
self.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:))))
|
||||||
self.addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: #selector(self.longPressGesture(_:))))
|
|
||||||
|
|
||||||
self.hierarchyTrackingLayer.didEnterHierarchy = { [weak self] in
|
self.hierarchyTrackingLayer.didEnterHierarchy = { [weak self] in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
@ -184,12 +179,6 @@ public final class EmojiStatusComponent: Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func longPressGesture(_ recognizer: UITapGestureRecognizer) {
|
|
||||||
if case .began = recognizer.state {
|
|
||||||
self.component?.longTapAction?()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func update(component: EmojiStatusComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: Transition) -> CGSize {
|
func update(component: EmojiStatusComponent, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: Transition) -> CGSize {
|
||||||
self.state = state
|
self.state = state
|
||||||
|
|
||||||
@ -200,6 +189,8 @@ public final class EmojiStatusComponent: Component {
|
|||||||
var emojiLoopMode: LoopMode?
|
var emojiLoopMode: LoopMode?
|
||||||
var emojiSize = CGSize()
|
var emojiSize = CGSize()
|
||||||
|
|
||||||
|
self.isUserInteractionEnabled = component.action != nil
|
||||||
|
|
||||||
//let previousContent = self.component?.content
|
//let previousContent = self.component?.content
|
||||||
if self.component?.content != component.content {
|
if self.component?.content != component.content {
|
||||||
switch component.content {
|
switch component.content {
|
||||||
|
|||||||
@ -223,6 +223,7 @@ public final class EmojiStatusSelectionController: ViewController {
|
|||||||
|
|
||||||
private var emojiContentDisposable: Disposable?
|
private var emojiContentDisposable: Disposable?
|
||||||
private var emojiContent: EmojiPagerContentComponent?
|
private var emojiContent: EmojiPagerContentComponent?
|
||||||
|
private var freezeUpdates: Bool = false
|
||||||
private var scheduledEmojiContentAnimationHint: EmojiPagerContentComponent.ContentAnimation?
|
private var scheduledEmojiContentAnimationHint: EmojiPagerContentComponent.ContentAnimation?
|
||||||
|
|
||||||
private var availableReactions: AvailableReactions?
|
private var availableReactions: AvailableReactions?
|
||||||
@ -281,7 +282,9 @@ public final class EmojiStatusSelectionController: ViewController {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.controller?._ready.set(.single(true))
|
strongSelf.controller?._ready.set(.single(true))
|
||||||
|
if strongSelf.emojiContent == nil || !strongSelf.freezeUpdates {
|
||||||
strongSelf.emojiContent = emojiContent
|
strongSelf.emojiContent = emojiContent
|
||||||
|
}
|
||||||
|
|
||||||
emojiContent.inputInteractionHolder.inputInteraction = EmojiPagerContentComponent.InputInteraction(
|
emojiContent.inputInteractionHolder.inputInteraction = EmojiPagerContentComponent.InputInteraction(
|
||||||
performItemAction: { groupId, item, _, _, _, _ in
|
performItemAction: { groupId, item, _, _, _, _ in
|
||||||
@ -524,12 +527,6 @@ public final class EmojiStatusSelectionController: ViewController {
|
|||||||
itemCompleted = true
|
itemCompleted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if let availableReactions = self.availableReactions, let availableReaction = availableReactions.reactions.first(where: { $0.value == }) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
effectCompleted = true
|
|
||||||
}*/
|
|
||||||
|
|
||||||
self.animateOut(completion: {
|
self.animateOut(completion: {
|
||||||
contentCompleted = true
|
contentCompleted = true
|
||||||
completion()
|
completion()
|
||||||
@ -699,6 +696,19 @@ public final class EmojiStatusSelectionController: ViewController {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.freezeUpdates = true
|
||||||
|
|
||||||
|
if let _ = item, let destinationView = controller.destinationItemView() {
|
||||||
|
if let snapshotView = destinationView.snapshotView(afterScreenUpdates: false) {
|
||||||
|
snapshotView.frame = destinationView.frame
|
||||||
|
destinationView.superview?.insertSubview(snapshotView, belowSubview: destinationView)
|
||||||
|
snapshotView.layer.animateScale(from: 1.0, to: 0.001, duration: 0.15, removeOnCompletion: false, completion: { [weak snapshotView] _ in
|
||||||
|
snapshotView?.removeFromSuperview()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
destinationView.isHidden = true
|
||||||
|
}
|
||||||
|
|
||||||
switch controller.mode {
|
switch controller.mode {
|
||||||
case .statusSelection:
|
case .statusSelection:
|
||||||
let _ = (self.context.engine.accountData.setEmojiStatus(file: item?.itemFile)
|
let _ = (self.context.engine.accountData.setEmojiStatus(file: item?.itemFile)
|
||||||
|
|||||||
@ -1717,7 +1717,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
public let isPremiumLocked: Bool
|
public let isPremiumLocked: Bool
|
||||||
public let isEmbedded: Bool
|
public let isEmbedded: Bool
|
||||||
public let hasClear: Bool
|
public let hasClear: Bool
|
||||||
public let isExpandable: Bool
|
public let collapsedLineCount: Int?
|
||||||
public let displayPremiumBadges: Bool
|
public let displayPremiumBadges: Bool
|
||||||
public let headerItem: EntityKeyboardAnimationData?
|
public let headerItem: EntityKeyboardAnimationData?
|
||||||
public let items: [Item]
|
public let items: [Item]
|
||||||
@ -1732,7 +1732,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
isPremiumLocked: Bool,
|
isPremiumLocked: Bool,
|
||||||
isEmbedded: Bool,
|
isEmbedded: Bool,
|
||||||
hasClear: Bool,
|
hasClear: Bool,
|
||||||
isExpandable: Bool,
|
collapsedLineCount: Int?,
|
||||||
displayPremiumBadges: Bool,
|
displayPremiumBadges: Bool,
|
||||||
headerItem: EntityKeyboardAnimationData?,
|
headerItem: EntityKeyboardAnimationData?,
|
||||||
items: [Item]
|
items: [Item]
|
||||||
@ -1746,7 +1746,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
self.isPremiumLocked = isPremiumLocked
|
self.isPremiumLocked = isPremiumLocked
|
||||||
self.isEmbedded = isEmbedded
|
self.isEmbedded = isEmbedded
|
||||||
self.hasClear = hasClear
|
self.hasClear = hasClear
|
||||||
self.isExpandable = isExpandable
|
self.collapsedLineCount = collapsedLineCount
|
||||||
self.displayPremiumBadges = displayPremiumBadges
|
self.displayPremiumBadges = displayPremiumBadges
|
||||||
self.headerItem = headerItem
|
self.headerItem = headerItem
|
||||||
self.items = items
|
self.items = items
|
||||||
@ -1783,7 +1783,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
if lhs.hasClear != rhs.hasClear {
|
if lhs.hasClear != rhs.hasClear {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if lhs.isExpandable != rhs.isExpandable {
|
if lhs.collapsedLineCount != rhs.collapsedLineCount {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if lhs.displayPremiumBadges != rhs.displayPremiumBadges {
|
if lhs.displayPremiumBadges != rhs.displayPremiumBadges {
|
||||||
@ -1900,7 +1900,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
let isFeatured: Bool
|
let isFeatured: Bool
|
||||||
let itemCount: Int
|
let itemCount: Int
|
||||||
let isEmbedded: Bool
|
let isEmbedded: Bool
|
||||||
let isExpandable: Bool
|
let collapsedLineCount: Int?
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct ItemGroupLayout: Equatable {
|
private struct ItemGroupLayout: Equatable {
|
||||||
@ -2034,13 +2034,8 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
let visibleItemCount: Int
|
let visibleItemCount: Int
|
||||||
if itemGroup.isEmbedded {
|
if itemGroup.isEmbedded {
|
||||||
visibleItemCount = 0
|
visibleItemCount = 0
|
||||||
} else if itemGroup.isExpandable && !expandedGroupIds.contains(itemGroup.groupId) {
|
} else if let collapsedLineCount = itemGroup.collapsedLineCount, !expandedGroupIds.contains(itemGroup.groupId) {
|
||||||
let maxLines: Int
|
let maxLines: Int = collapsedLineCount
|
||||||
#if DEBUG
|
|
||||||
maxLines = 2
|
|
||||||
#else
|
|
||||||
maxLines = 3
|
|
||||||
#endif
|
|
||||||
if numRowsInGroup > maxLines {
|
if numRowsInGroup > maxLines {
|
||||||
visibleItemCount = self.itemsPerRow * maxLines - 1
|
visibleItemCount = self.itemsPerRow * maxLines - 1
|
||||||
collapsedItemIndex = visibleItemCount
|
collapsedItemIndex = visibleItemCount
|
||||||
@ -4562,7 +4557,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
isFeatured: itemGroup.isFeatured,
|
isFeatured: itemGroup.isFeatured,
|
||||||
itemCount: itemGroup.items.count,
|
itemCount: itemGroup.items.count,
|
||||||
isEmbedded: itemGroup.isEmbedded,
|
isEmbedded: itemGroup.isEmbedded,
|
||||||
isExpandable: itemGroup.isExpandable
|
collapsedLineCount: itemGroup.collapsedLineCount
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4789,7 +4784,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
var subtitle: String?
|
var subtitle: String?
|
||||||
var isPremiumLocked: Bool
|
var isPremiumLocked: Bool
|
||||||
var isFeatured: Bool
|
var isFeatured: Bool
|
||||||
var isExpandable: Bool
|
var collapsedLineCount: Int?
|
||||||
var isClearable: Bool
|
var isClearable: Bool
|
||||||
var headerItem: EntityKeyboardAnimationData?
|
var headerItem: EntityKeyboardAnimationData?
|
||||||
var items: [EmojiPagerContentComponent.Item]
|
var items: [EmojiPagerContentComponent.Item]
|
||||||
@ -4831,7 +4826,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
itemGroups[groupIndex].items.append(resultItem)
|
itemGroups[groupIndex].items.append(resultItem)
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: true, isClearable: false, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: 5, isClearable: false, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
|
|
||||||
var existingIds = Set<MediaId>()
|
var existingIds = Set<MediaId>()
|
||||||
@ -4986,7 +4981,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: false, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: false, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5039,7 +5034,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
itemGroups[groupIndex].items.append(resultItem)
|
itemGroups[groupIndex].items.append(resultItem)
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: popularTitle, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: hasRecent && !isQuickReactionSelection, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: popularTitle, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: hasRecent && !isQuickReactionSelection, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let groupId = "recent"
|
let groupId = "recent"
|
||||||
@ -5051,7 +5046,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: false, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: nil, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: false, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5118,7 +5113,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
popularInsertIndex += 1
|
popularInsertIndex += 1
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: popularTitle, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: hasRecent && !isQuickReactionSelection, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: popularTitle, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: hasRecent && !isQuickReactionSelection, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5166,7 +5161,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
itemGroups[groupIndex].items.append(resultItem)
|
itemGroups[groupIndex].items.append(resultItem)
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: strings.Emoji_FrequentlyUsed, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: true, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: strings.Emoji_FrequentlyUsed, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: true, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5188,7 +5183,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
itemGroups[groupIndex].items.append(resultItem)
|
itemGroups[groupIndex].items.append(resultItem)
|
||||||
} else {
|
} else {
|
||||||
itemGroupIndexById[groupId] = itemGroups.count
|
itemGroupIndexById[groupId] = itemGroups.count
|
||||||
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: strings.EmojiInput_SectionTitleEmoji, subtitle: nil, isPremiumLocked: false, isFeatured: false, isExpandable: false, isClearable: false, headerItem: nil, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: groupId, id: groupId, title: strings.EmojiInput_SectionTitleEmoji, subtitle: nil, isPremiumLocked: false, isFeatured: false, collapsedLineCount: nil, isClearable: false, headerItem: nil, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5260,7 +5255,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
break inner
|
break inner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
itemGroups.append(ItemGroup(supergroupId: supergroupId, id: groupId, title: title, subtitle: nil, isPremiumLocked: isPremiumLocked, isFeatured: false, isExpandable: false, isClearable: false, headerItem: headerItem, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: supergroupId, id: groupId, title: title, subtitle: nil, isPremiumLocked: isPremiumLocked, isFeatured: false, collapsedLineCount: nil, isClearable: false, headerItem: headerItem, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5316,7 +5311,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
itemGroups.append(ItemGroup(supergroupId: supergroupId, id: groupId, title: featuredEmojiPack.info.title, subtitle: nil, isPremiumLocked: isPremiumLocked, isFeatured: true, isExpandable: true, isClearable: false, headerItem: headerItem, items: [resultItem]))
|
itemGroups.append(ItemGroup(supergroupId: supergroupId, id: groupId, title: featuredEmojiPack.info.title, subtitle: nil, isPremiumLocked: isPremiumLocked, isFeatured: true, collapsedLineCount: 3, isClearable: false, headerItem: headerItem, items: [resultItem]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5358,7 +5353,7 @@ public final class EmojiPagerContentComponent: Component {
|
|||||||
isPremiumLocked: group.isPremiumLocked,
|
isPremiumLocked: group.isPremiumLocked,
|
||||||
isEmbedded: false,
|
isEmbedded: false,
|
||||||
hasClear: group.isClearable,
|
hasClear: group.isClearable,
|
||||||
isExpandable: group.isExpandable,
|
collapsedLineCount: group.collapsedLineCount,
|
||||||
displayPremiumBadges: false,
|
displayPremiumBadges: false,
|
||||||
headerItem: headerItem,
|
headerItem: headerItem,
|
||||||
items: group.items
|
items: group.items
|
||||||
|
|||||||
@ -505,7 +505,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
|
|||||||
isPremiumLocked: group.isPremiumLocked,
|
isPremiumLocked: group.isPremiumLocked,
|
||||||
isEmbedded: isEmbedded,
|
isEmbedded: isEmbedded,
|
||||||
hasClear: hasClear,
|
hasClear: hasClear,
|
||||||
isExpandable: false,
|
collapsedLineCount: nil,
|
||||||
displayPremiumBadges: group.displayPremiumBadges,
|
displayPremiumBadges: group.displayPremiumBadges,
|
||||||
headerItem: group.headerItem,
|
headerItem: group.headerItem,
|
||||||
items: group.items
|
items: group.items
|
||||||
|
|||||||
@ -2458,8 +2458,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
|
|||||||
animationRenderer: item.context.animationRenderer,
|
animationRenderer: item.context.animationRenderer,
|
||||||
content: currentCredibilityIcon,
|
content: currentCredibilityIcon,
|
||||||
isVisibleForAnimations: strongSelf.visibilityStatus,
|
isVisibleForAnimations: strongSelf.visibilityStatus,
|
||||||
action: nil,
|
action: nil
|
||||||
longTapAction: nil
|
|
||||||
)
|
)
|
||||||
|
|
||||||
let credibilityIconSize = credibilityIconView.update(
|
let credibilityIconSize = credibilityIconView.update(
|
||||||
|
|||||||
@ -690,8 +690,7 @@ final class ChatTitleView: UIView, NavigationBarTitleView {
|
|||||||
animationRenderer: self.animationRenderer,
|
animationRenderer: self.animationRenderer,
|
||||||
content: titleCredibilityContent,
|
content: titleCredibilityContent,
|
||||||
isVisibleForAnimations: true,
|
isVisibleForAnimations: true,
|
||||||
action: nil,
|
action: nil
|
||||||
longTapAction: nil
|
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: CGSize(width: 20.0, height: 20.0)
|
containerSize: CGSize(width: 20.0, height: 20.0)
|
||||||
|
|||||||
@ -2373,12 +2373,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
strongSelf.displayPremiumIntro?(strongSelf.titleCredibilityIconView, currentEmojiStatus, strongSelf.emojiStatusFileAndPackTitle.get(), false)
|
strongSelf.displayPremiumIntro?(strongSelf.titleCredibilityIconView, currentEmojiStatus, strongSelf.emojiStatusFileAndPackTitle.get(), false)
|
||||||
},
|
},
|
||||||
longTapAction: { [weak self] in
|
emojiFileUpdated: { [weak self] emojiFile in
|
||||||
guard let strongSelf = self else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let _ = strongSelf.context.engine.accountData.setEmojiStatus(file: nil).start()
|
|
||||||
}, emojiFileUpdated: { [weak self] emojiFile in
|
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -2432,12 +2427,6 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
strongSelf.displayPremiumIntro?(strongSelf.titleExpandedCredibilityIconView, currentEmojiStatus, strongSelf.emojiStatusFileAndPackTitle.get(), true)
|
strongSelf.displayPremiumIntro?(strongSelf.titleExpandedCredibilityIconView, currentEmojiStatus, strongSelf.emojiStatusFileAndPackTitle.get(), true)
|
||||||
},
|
|
||||||
longTapAction: { [weak self] in
|
|
||||||
guard let strongSelf = self else {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let _ = strongSelf.context.engine.accountData.setEmojiStatus(file: nil).start()
|
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user