mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Copy goes before Edit
This commit is contained in:
parent
5608bef4e6
commit
b9027825d2
@ -382,34 +382,6 @@ func contextMenuForChatPresentationIntefaceState(chatPresentationInterfaceState:
|
|||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
if data.messageActions.options.contains(.sendScheduledNow) {
|
|
||||||
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.ScheduledMessages_SendNow, icon: { theme in
|
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Resend"), color: theme.actionSheet.primaryTextColor)
|
|
||||||
}, action: { _, f in
|
|
||||||
controllerInteraction.sendScheduledMessagesNow(selectAll ? messages.map { $0.id } : [message.id])
|
|
||||||
f(.dismissWithoutContent)
|
|
||||||
})))
|
|
||||||
}
|
|
||||||
|
|
||||||
if data.messageActions.options.contains(.editScheduledTime) {
|
|
||||||
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.ScheduledMessages_EditTime, icon: { theme in
|
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Schedule"), color: theme.actionSheet.primaryTextColor)
|
|
||||||
}, action: { _, f in
|
|
||||||
controllerInteraction.editScheduledMessagesTime(selectAll ? messages.map { $0.id } : [message.id])
|
|
||||||
f(.dismissWithoutContent)
|
|
||||||
})))
|
|
||||||
}
|
|
||||||
|
|
||||||
if data.canEdit {
|
|
||||||
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.Conversation_MessageDialogEdit, icon: { theme in
|
|
||||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Edit"), color: theme.actionSheet.primaryTextColor)
|
|
||||||
}, action: { _, f in
|
|
||||||
interfaceInteraction.setupEditMessage(messages[0].id, { transition in
|
|
||||||
f(.custom(transition))
|
|
||||||
})
|
|
||||||
})))
|
|
||||||
}
|
|
||||||
|
|
||||||
let resourceAvailable: Bool
|
let resourceAvailable: Bool
|
||||||
if let resourceStatus = data.resourceStatus, case .Local = resourceStatus {
|
if let resourceStatus = data.resourceStatus, case .Local = resourceStatus {
|
||||||
resourceAvailable = true
|
resourceAvailable = true
|
||||||
@ -462,6 +434,34 @@ func contextMenuForChatPresentationIntefaceState(chatPresentationInterfaceState:
|
|||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if data.messageActions.options.contains(.sendScheduledNow) {
|
||||||
|
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.ScheduledMessages_SendNow, icon: { theme in
|
||||||
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Resend"), color: theme.actionSheet.primaryTextColor)
|
||||||
|
}, action: { _, f in
|
||||||
|
controllerInteraction.sendScheduledMessagesNow(selectAll ? messages.map { $0.id } : [message.id])
|
||||||
|
f(.dismissWithoutContent)
|
||||||
|
})))
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.messageActions.options.contains(.editScheduledTime) {
|
||||||
|
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.ScheduledMessages_EditTime, icon: { theme in
|
||||||
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Schedule"), color: theme.actionSheet.primaryTextColor)
|
||||||
|
}, action: { _, f in
|
||||||
|
controllerInteraction.editScheduledMessagesTime(selectAll ? messages.map { $0.id } : [message.id])
|
||||||
|
f(.dismissWithoutContent)
|
||||||
|
})))
|
||||||
|
}
|
||||||
|
|
||||||
|
if data.canEdit {
|
||||||
|
actions.append(.action(ContextMenuActionItem(text: chatPresentationInterfaceState.strings.Conversation_MessageDialogEdit, icon: { theme in
|
||||||
|
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Edit"), color: theme.actionSheet.primaryTextColor)
|
||||||
|
}, action: { _, f in
|
||||||
|
interfaceInteraction.setupEditMessage(messages[0].id, { transition in
|
||||||
|
f(.custom(transition))
|
||||||
|
})
|
||||||
|
})))
|
||||||
|
}
|
||||||
|
|
||||||
var activePoll: TelegramMediaPoll?
|
var activePoll: TelegramMediaPoll?
|
||||||
for media in message.media {
|
for media in message.media {
|
||||||
if let poll = media as? TelegramMediaPoll, !poll.isClosed, message.id.namespace == Namespaces.Message.Cloud, poll.pollId.namespace == Namespaces.Media.CloudPoll {
|
if let poll = media as? TelegramMediaPoll, !poll.isClosed, message.id.namespace == Namespaces.Message.Cloud, poll.pollId.namespace == Namespaces.Media.CloudPoll {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user