mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
Various fixes
This commit is contained in:
parent
b337ce0b05
commit
21b9ee462b
@ -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
|
||||||
)),
|
)),
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user