Story reactions improvements

This commit is contained in:
Ilya Laktyushin
2023-08-28 23:56:33 +04:00
parent 930420c0f0
commit d0e9953d28
8 changed files with 90 additions and 29 deletions

View File

@@ -99,10 +99,18 @@ public enum CodableDrawingEntity: Equatable {
)
)
case let .sticker(entity):
if case let .file(_, type) = entity.content, case let .reaction(reaction, _) = type {
if case let .file(_, type) = entity.content, case let .reaction(reaction, style) = type {
var flags: MediaArea.ReactionFlags = []
if case .black = style {
flags.insert(.isDark)
}
if entity.mirrored {
flags.insert(.isFlipped)
}
return .reaction(
coordinates: coordinates,
reaction: reaction
reaction: reaction,
flags: flags
)
} else {
return nil