mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-06-08 19:13:56 +02:00
Update Ghostgram features
This commit is contained in:
+2
-2
@@ -126,9 +126,9 @@ public final class EntityKeyboardAnimationData: Equatable {
|
||||
var file: TelegramMediaFile?
|
||||
var color: UIColor?
|
||||
for attribute in gift.attributes {
|
||||
if case let .model(_, fileValue, _) = attribute {
|
||||
if case let StarGift.UniqueGift.Attribute.model(_, fileValue, _, _) = attribute {
|
||||
file = fileValue
|
||||
} else if case let .backdrop(_, _, innerColor, outerColor, _, _, _) = attribute {
|
||||
} else if case let StarGift.UniqueGift.Attribute.backdrop(_, _, innerColor, outerColor, _, _, _) = attribute {
|
||||
color = UIColor(rgb: UInt32(bitPattern: innerColor))
|
||||
let _ = outerColor
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import SGSimpleSettings
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Display
|
||||
@@ -558,9 +559,22 @@ public final class EntityKeyboardComponent: Component {
|
||||
|
||||
let emojiContentItemIdUpdated = ActionSlot<(AnyHashable, AnyHashable?, ComponentTransition)>()
|
||||
if let emojiContent = component.emojiContent {
|
||||
contents.append(AnyComponentWithIdentity(id: "emoji", component: AnyComponent(emojiContent)))
|
||||
let effectiveEmojiContent: EmojiPagerContentComponent
|
||||
// MARK: Swiftgram
|
||||
if SGSimpleSettings.shared.defaultEmojisFirst {
|
||||
effectiveEmojiContent = emojiContent.withUpdatedItemGroups(
|
||||
panelItemGroups: sgPatchEmojiKeyboardItems(emojiContent.panelItemGroups),
|
||||
contentItemGroups: sgPatchEmojiKeyboardItems(emojiContent.contentItemGroups),
|
||||
itemContentUniqueId: emojiContent.itemContentUniqueId,
|
||||
emptySearchResults: emojiContent.emptySearchResults,
|
||||
searchState: emojiContent.searchState
|
||||
)
|
||||
} else {
|
||||
effectiveEmojiContent = emojiContent
|
||||
}
|
||||
contents.append(AnyComponentWithIdentity(id: "emoji", component: AnyComponent(effectiveEmojiContent)))
|
||||
var topEmojiItems: [EntityKeyboardTopPanelComponent.Item] = []
|
||||
for itemGroup in emojiContent.panelItemGroups {
|
||||
for itemGroup in effectiveEmojiContent.panelItemGroups {
|
||||
if !itemGroup.items.isEmpty {
|
||||
if let id = itemGroup.groupId.base as? String, id != "peerSpecific" {
|
||||
if id == "recent" || id == "liked" || id == "collectible" {
|
||||
@@ -612,12 +626,12 @@ public final class EntityKeyboardComponent: Component {
|
||||
id: itemGroup.supergroupId,
|
||||
isReorderable: !itemGroup.isFeatured,
|
||||
content: AnyComponent(EntityKeyboardAnimationTopPanelComponent(
|
||||
context: emojiContent.context,
|
||||
context: effectiveEmojiContent.context,
|
||||
item: itemGroup.headerItem ?? animationData,
|
||||
isFeatured: itemGroup.isFeatured,
|
||||
isPremiumLocked: itemGroup.isPremiumLocked,
|
||||
animationCache: emojiContent.animationCache,
|
||||
animationRenderer: emojiContent.animationRenderer,
|
||||
animationCache: effectiveEmojiContent.animationCache,
|
||||
animationRenderer: effectiveEmojiContent.animationRenderer,
|
||||
theme: component.theme,
|
||||
title: itemGroup.title ?? "",
|
||||
customTintColor: component.customTintColor ?? itemGroup.customTintColor,
|
||||
|
||||
Reference in New Issue
Block a user