mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[WIP] Topics
This commit is contained in:
@@ -90,17 +90,17 @@ func telegramMediaActionFromApiAction(_ action: Api.MessageAction) -> TelegramMe
|
||||
case let .messageActionTopicCreate(_, title, iconColor, iconEmojiId):
|
||||
return TelegramMediaAction(action: .topicCreated(title: title, iconColor: iconColor, iconFileId: iconEmojiId))
|
||||
case let .messageActionTopicEdit(flags, title, iconEmojiId, closed):
|
||||
var componenents: [TelegramMediaActionType.ForumTopicEditComponent] = []
|
||||
var components: [TelegramMediaActionType.ForumTopicEditComponent] = []
|
||||
if let title = title {
|
||||
componenents.append(.title(title))
|
||||
components.append(.title(title))
|
||||
}
|
||||
if (flags & (1 << 1)) != 0 {
|
||||
componenents.append(.iconFileId(iconEmojiId == 0 ? nil : iconEmojiId))
|
||||
components.append(.iconFileId(iconEmojiId == 0 ? nil : iconEmojiId))
|
||||
}
|
||||
if let closed = closed {
|
||||
componenents.append(.isClosed(closed == .boolTrue))
|
||||
components.append(.isClosed(closed == .boolTrue))
|
||||
}
|
||||
return TelegramMediaAction(action: .topicEdited(components: componenents))
|
||||
return TelegramMediaAction(action: .topicEdited(components: components))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user