Fixes
This commit is contained in:
parent
96de278d49
commit
96089108ca
4 changed files with 25 additions and 27 deletions
|
|
@ -2806,6 +2806,15 @@ func extractEmojiFileIds(message: StoreMessage, fileIds: inout Set<Int64>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
for media in message.media {
|
||||
if let media = media as? TelegramMediaWebpage, case let .Loaded(content) = media.content {
|
||||
for attribute in content.attributes {
|
||||
if case let .aiTextStyle(aiTextStyle) = attribute {
|
||||
fileIds.insert(aiTextStyle.emojiFileId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func messagesFromOperations(state: AccountMutableState) -> [StoreMessage] {
|
||||
|
|
|
|||
|
|
@ -7,15 +7,6 @@ struct Rectangle {
|
|||
float2 size;
|
||||
};
|
||||
|
||||
constant static float2 quadVertices[6] = {
|
||||
float2(0.0, 0.0),
|
||||
float2(1.0, 0.0),
|
||||
float2(0.0, 1.0),
|
||||
float2(1.0, 0.0),
|
||||
float2(0.0, 1.0),
|
||||
float2(1.0, 1.0)
|
||||
};
|
||||
|
||||
struct QuadVertexOut {
|
||||
float4 position [[position]];
|
||||
float2 uv;
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ final class TextProcessingContentComponent: Component {
|
|||
))
|
||||
}
|
||||
items.append(.action(ContextMenuActionItem(
|
||||
text: "Share Style",
|
||||
text: "Share Style", //TODO:localize
|
||||
icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Forward"), color: theme.contextMenu.primaryColor)
|
||||
},
|
||||
|
|
@ -382,23 +382,21 @@ final class TextProcessingContentComponent: Component {
|
|||
})
|
||||
})
|
||||
))
|
||||
if style.isAuthor {
|
||||
items.append(.action(ContextMenuActionItem(
|
||||
text: "Delete Style",
|
||||
textColor: .destructive,
|
||||
icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.contextMenu.destructiveColor)
|
||||
},
|
||||
action: { [weak self] c, _ in
|
||||
c?.dismiss(completion: { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.requestDeleteStyle(id: id)
|
||||
})
|
||||
items.append(.action(ContextMenuActionItem(
|
||||
text: "Delete Style",
|
||||
textColor: .destructive,
|
||||
icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.contextMenu.destructiveColor)
|
||||
},
|
||||
action: { [weak self] c, _ in
|
||||
c?.dismiss(completion: { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.requestDeleteStyle(id: id)
|
||||
})
|
||||
))
|
||||
}
|
||||
})
|
||||
))
|
||||
|
||||
final class ContextExtractedContentSourceImpl: ContextExtractedContentSource {
|
||||
let keepInPlace: Bool = false
|
||||
|
|
|
|||
|
|
@ -889,7 +889,7 @@ public class TextStyleEditScreen: ViewControllerComponentContainer {
|
|||
|
||||
var initialEmojiFile: TelegramMediaFile?
|
||||
if case let .edit(style) = mode, case let .custom(style) = style.content, let emojiFileId = style.emojiFileId {
|
||||
initialEmojiFile = await context.engine.stickers.resolveInlineStickers(fileIds: [emojiFileId]).get()[emojiFileId]
|
||||
initialEmojiFile = await context.engine.stickers.resolveInlineStickersLocal(fileIds: [emojiFileId]).get()[emojiFileId]
|
||||
}
|
||||
|
||||
super.init(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue