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( PageComponent(
content: AnyComponent(PhoneDemoComponent( content: AnyComponent(PhoneDemoComponent(
context: component.context, context: component.context,
position: .top, position: .bottom,
videoFile: configuration.videos["animated_emoji"], videoFile: configuration.videos["animated_emoji"],
decoration: .emoji decoration: .emoji
)), )),

View File

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

View File

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