Various fixes

This commit is contained in:
Ilya Laktyushin 2022-07-16 18:00:37 +02:00
parent b337ce0b05
commit 21b9ee462b
3 changed files with 9 additions and 8 deletions

View File

@ -904,7 +904,7 @@ private final class DemoSheetContent: CombinedComponent {
PageComponent(
content: AnyComponent(PhoneDemoComponent(
context: component.context,
position: .top,
position: .bottom,
videoFile: configuration.videos["animated_emoji"],
decoration: .emoji
)),

View File

@ -255,11 +255,11 @@ private struct PremiumIntroConfiguration {
.noAds,
.uniqueReactions,
.premiumStickers,
.animatedEmoji,
.advancedChatManagement,
.profileBadge,
.animatedUserpics,
.appIcons,
.animatedEmoji
.appIcons
])
}
@ -288,9 +288,6 @@ private struct PremiumIntroConfiguration {
if perks.count < 4 {
perks = PremiumIntroConfiguration.defaultValue.perks
}
if !perks.contains(.appIcons) {
perks.append(.appIcons)
}
return PremiumIntroConfiguration(perks: perks)
} else {
return .defaultValue

View File

@ -1106,11 +1106,15 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|> then(
context.engine.stickers.resolveInlineStickers(fileIds: emojiFileIds)
|> mapToSignal { files -> Signal<ContextController.Items, NoError> in
var packReferences = Set<StickerPackReference>()
var packReferences: [StickerPackReference] = []
var existingIds = Set<Int64>()
for (_, file) in files {
loop: for attribute in file.attributes {
if case let .CustomEmoji(_, _, packReference) = attribute, let packReference = packReference {
packReferences.insert(packReference)
if case let .id(id, _) = packReference, !existingIds.contains(id) {
packReferences.append(packReference)
existingIds.insert(id)
}
break loop
}
}