mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
6f4f3817a9
commit
555e36a19a
@ -688,7 +688,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
||||
sendButtonFrame.origin.y -= menuHeightWithInset
|
||||
}
|
||||
sendButtonFrame.origin.y = min(sendButtonFrame.origin.y + contentOffset, layout.size.height - layout.intrinsicInsets.bottom - initialSendButtonFrame.height)
|
||||
transition.updateFrame(node: self.sendButtonNode, frame: sendButtonFrame)
|
||||
transition.updateFrameAsPositionAndBounds(node: self.sendButtonNode, frame: sendButtonFrame)
|
||||
|
||||
var messageFrame = self.textFieldFrame
|
||||
messageFrame.size.width += 32.0
|
||||
|
@ -1316,14 +1316,14 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable {
|
||||
|
||||
self.navigationItem.titleView = self.titleView
|
||||
|
||||
if case let .assets(collection, isStandalone) = self.subject {
|
||||
if !isStandalone {
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Cancel, style: .plain, target: self, action: #selector(self.cancelPressed))
|
||||
} else if collection != nil {
|
||||
if case let .assets(_, isStandalone) = self.subject, isStandalone {
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(backButtonAppearanceWithTitle: self.presentationData.strings.Common_Back, target: self, action: #selector(self.backPressed))
|
||||
} else {
|
||||
if case let .assets(collection, _) = self.subject, collection != nil {
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(backButtonAppearanceWithTitle: self.presentationData.strings.Common_Back, target: self, action: #selector(self.backPressed))
|
||||
}
|
||||
} else {
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: self.presentationData.strings.Common_Cancel, style: .plain, target: self, action: #selector(self.cancelPressed))
|
||||
}
|
||||
|
||||
if self.bannedSendPhotos != nil && self.bannedSendVideos != nil {
|
||||
} else {
|
||||
@ -1596,6 +1596,9 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable {
|
||||
}
|
||||
|
||||
@objc private func backPressed() {
|
||||
if let _ = self.navigationController {
|
||||
self.dismiss()
|
||||
} else {
|
||||
self.updateNavigationStack { current in
|
||||
var mediaPickerContext: AttachmentMediaPickerContext?
|
||||
if let first = current.first as? MediaPickerScreen {
|
||||
@ -1604,6 +1607,7 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable {
|
||||
return (current.filter { $0 !== self }, mediaPickerContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func dismissAllTooltips() {
|
||||
self.undoOverlayController?.dismissWithCommitAction()
|
||||
|
@ -76,7 +76,7 @@ final class ChatTextInputActionButtonsNode: ASDisplayNode {
|
||||
} else {
|
||||
if highlighted {
|
||||
strongSelf.sendContainerNode.layer.animateScale(from: 1.0, to: 0.75, duration: 0.4, removeOnCompletion: false)
|
||||
} else if let presentationLayer = strongSelf.sendButton.layer.presentation() {
|
||||
} else if let presentationLayer = strongSelf.sendContainerNode.layer.presentation() {
|
||||
strongSelf.sendContainerNode.layer.animateScale(from: CGFloat((presentationLayer.value(forKeyPath: "transform.scale.y") as? NSNumber)?.floatValue ?? 1.0), to: 1.0, duration: 0.25, removeOnCompletion: false)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user