mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Tune forwarding toast animation
This commit is contained in:
parent
d7017ce4d4
commit
e53c6edf2e
@ -908,7 +908,7 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo
|
|||||||
if let strongSelf = self, let _ = peerSelectionController {
|
if let strongSelf = self, let _ = peerSelectionController {
|
||||||
if peerId == strongSelf.context.account.peerId {
|
if peerId == strongSelf.context.account.peerId {
|
||||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
(strongSelf.navigationController?.topViewController as? ViewController)?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root))
|
(strongSelf.navigationController?.topViewController as? ViewController)?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root))
|
||||||
|
|
||||||
let _ = (enqueueMessages(account: strongSelf.context.account, peerId: peerId, messages: messageIds.map { id -> EnqueueMessage in
|
let _ = (enqueueMessages(account: strongSelf.context.account, peerId: peerId, messages: messageIds.map { id -> EnqueueMessage in
|
||||||
return .forward(source: id, grouping: .auto, attributes: [])
|
return .forward(source: id, grouping: .auto, attributes: [])
|
||||||
|
|||||||
@ -591,10 +591,9 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
if self.fromForeignApp {
|
if self.fromForeignApp {
|
||||||
self.transitionToContentNode(ShareLoadingContainerNode(theme: self.presentationData.theme, forceNativeAppearance: true), fastOut: true)
|
self.transitionToContentNode(ShareLoadingContainerNode(theme: self.presentationData.theme, forceNativeAppearance: true), fastOut: true)
|
||||||
} else {
|
} else {
|
||||||
self.animateOut(shared: true, completion: { [weak self] in
|
self.animateOut(shared: true, completion: {
|
||||||
self?
|
|
||||||
.completed?(peerIds)
|
|
||||||
})
|
})
|
||||||
|
self.completed?(peerIds)
|
||||||
}
|
}
|
||||||
let fromForeignApp = self.fromForeignApp
|
let fromForeignApp = self.fromForeignApp
|
||||||
self.shareDisposable.set((signal
|
self.shareDisposable.set((signal
|
||||||
@ -605,7 +604,7 @@ final class ShareControllerNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
|
|
||||||
if case .done = status, !fromForeignApp {
|
if case .done = status, !fromForeignApp {
|
||||||
strongSelf.dismiss?(true)
|
strongSelf.dismiss?(true)
|
||||||
strongSelf.completed?(peerIds)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
guard let contentNode = strongSelf.contentNode as? ShareLoadingContainerNode else {
|
guard let contentNode = strongSelf.contentNode as? ShareLoadingContainerNode else {
|
||||||
|
|||||||
@ -555,7 +555,7 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode {
|
|||||||
strongSelf.disabledOverlayNode = nil
|
strongSelf.disabledOverlayNode = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if let animateStatusTransitionFromUp = animateStatusTransitionFromUp {
|
if let animateStatusTransitionFromUp = animateStatusTransitionFromUp, !strongSelf.contextSourceNode.isExtractedToContextPreview {
|
||||||
let offset: CGFloat = animateStatusTransitionFromUp ? -7.0 : 7.0
|
let offset: CGFloat = animateStatusTransitionFromUp ? -7.0 : 7.0
|
||||||
if let snapshotView = strongSelf.statusNode.view.snapshotContentTree() {
|
if let snapshotView = strongSelf.statusNode.view.snapshotContentTree() {
|
||||||
strongSelf.statusNode.view.superview?.insertSubview(snapshotView, belowSubview: strongSelf.statusNode.view)
|
strongSelf.statusNode.view.superview?.insertSubview(snapshotView, belowSubview: strongSelf.statusNode.view)
|
||||||
|
|||||||
@ -1471,7 +1471,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current)
|
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: savedMessages, text: text), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -10519,7 +10519,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
strongController.dismiss()
|
strongController.dismiss()
|
||||||
} else if peerId == strongSelf.context.account.peerId {
|
} else if peerId == strongSelf.context.account.peerId {
|
||||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .current)
|
strongSelf.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messages.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .current)
|
||||||
|
|
||||||
let _ = (enqueueMessages(account: strongSelf.context.account, peerId: peerId, messages: messages.map { message -> EnqueueMessage in
|
let _ = (enqueueMessages(account: strongSelf.context.account, peerId: peerId, messages: messages.map { message -> EnqueueMessage in
|
||||||
return .forward(source: message.id, grouping: .auto, attributes: [])
|
return .forward(source: message.id, grouping: .auto, attributes: [])
|
||||||
|
|||||||
@ -5380,7 +5380,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
|
|||||||
if let strongSelf = self, let _ = peerSelectionController {
|
if let strongSelf = self, let _ = peerSelectionController {
|
||||||
if peerId == strongSelf.context.account.peerId {
|
if peerId == strongSelf.context.account.peerId {
|
||||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: false, action: { _ in return false }), in: .window(.root))
|
strongSelf.controller?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: messageIds.count == 1 ? presentationData.strings.Conversation_ForwardTooltip_SavedMessages_One : presentationData.strings.Conversation_ForwardTooltip_SavedMessages_Many), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root))
|
||||||
|
|
||||||
strongSelf.headerNode.navigationButtonContainer.performAction?(.selectionDone)
|
strongSelf.headerNode.navigationButtonContainer.performAction?(.selectionDone)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user