Visual fitting

This commit is contained in:
Ali 2020-09-08 19:27:56 +01:00
parent 2334adfa2b
commit d5a7be3800
3 changed files with 4 additions and 4 deletions

View File

@ -922,7 +922,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
updatedShareButtonNode.addTarget(strongSelf, action: #selector(strongSelf.shareButtonPressed), forControlEvents: .touchUpInside)
}
let buttonSize = updatedShareButtonNode.update(presentationData: item.presentationData, message: item.message, account: item.context.account)
updatedShareButtonNode.frame = CGRect(origin: CGPoint(x: updatedImageFrame.maxX + 8.0, y: updatedImageFrame.maxY - buttonSize.height), size: buttonSize)
updatedShareButtonNode.frame = CGRect(origin: CGPoint(x: updatedImageFrame.maxX + 8.0, y: updatedImageFrame.maxY - buttonSize.height - 4.0), size: buttonSize)
} else if let shareButtonNode = strongSelf.shareButtonNode {
shareButtonNode.removeFromSupernode()
strongSelf.shareButtonNode = nil

View File

@ -516,7 +516,7 @@ class ChatMessageStickerItemNode: ChatMessageItemView {
updatedShareButtonNode.addTarget(strongSelf, action: #selector(strongSelf.shareButtonPressed), forControlEvents: .touchUpInside)
}
let buttonSize = updatedShareButtonNode.update(presentationData: item.presentationData, message: item.message, account: item.context.account)
var shareButtonFrame = CGRect(origin: CGPoint(x: updatedImageFrame.maxX + 8.0, y: updatedImageFrame.maxY - 10.0 - buttonSize.height), size: buttonSize)
var shareButtonFrame = CGRect(origin: CGPoint(x: updatedImageFrame.maxX + 6.0, y: updatedImageFrame.maxY - 10.0 - buttonSize.height - 4.0), size: buttonSize)
if isEmoji && incoming {
shareButtonFrame.origin.x = dateAndStatusFrame.maxX + 8.0
}

View File

@ -3301,14 +3301,14 @@ final class PeerInfoHeaderNode: ASDisplayNode {
if buttonKeys.count > 3 {
if self.isOpenedFromChat {
switch buttonKey {
case .message, .search, .videoCall:
case .message, .search, .mute:
hiddenWhileExpanded = true
default:
hiddenWhileExpanded = false
}
} else {
switch buttonKey {
case .mute, .search, .videoCall:
case .mute, .search, .mute:
hiddenWhileExpanded = true
default:
hiddenWhileExpanded = false