mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Merge commit '1cc27e2a20c8cd889584c327f697d3c8c5c4b8fe'
# Conflicts: # submodules/AccountContext/Sources/AccountContext.swift # submodules/TelegramCore/Sources/ApiUtils/StoreMessage_Telegram.swift # submodules/TelegramCore/Sources/TelegramEngine/Messages/MediaArea.swift # submodules/TelegramCore/Sources/TelegramEngine/Messages/StoryListContext.swift # submodules/TelegramUI/Components/PeerInfo/PeerInfoStoryGridScreen/Sources/StorySearchGridScreen.swift # submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerViewSendMessage.swift # submodules/TelegramUI/Sources/SharedAccountContext.swift
This commit is contained in:
@@ -116,13 +116,23 @@ public enum CodableDrawingEntity: Equatable {
|
||||
latitude: entity.location.latitude,
|
||||
longitude: entity.location.longitude,
|
||||
venue: entity.location.venue,
|
||||
address: entity.location.address,
|
||||
queryId: entity.queryId,
|
||||
resultId: entity.resultId
|
||||
),
|
||||
address: nil
|
||||
)
|
||||
case let .sticker(entity):
|
||||
if case let .file(_, type) = entity.content, case let .reaction(reaction, style) = type {
|
||||
if case let .link(url, _, _, _, _, _, _) = entity.content {
|
||||
var url = url
|
||||
if !url.hasPrefix("http://") && !url.hasPrefix("https://") {
|
||||
url = "https://\(url)"
|
||||
}
|
||||
return .link(
|
||||
coordinates: coordinates,
|
||||
url: url
|
||||
)
|
||||
} else if case let .file(_, type) = entity.content, case let .reaction(reaction, style) = type {
|
||||
var flags: MediaArea.ReactionFlags = []
|
||||
if case .black = style {
|
||||
flags.insert(.isDark)
|
||||
@@ -136,7 +146,10 @@ public enum CodableDrawingEntity: Equatable {
|
||||
flags: flags
|
||||
)
|
||||
} else if case let .message(messageIds, _, _, _, _) = entity.content, let messageId = messageIds.first {
|
||||
return .channelMessage(coordinates: coordinates, messageId: messageId)
|
||||
return .channelMessage(
|
||||
coordinates: coordinates,
|
||||
messageId: messageId
|
||||
)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user