Fix isComposingView animation

This commit is contained in:
Benoit Martins 2023-02-06 16:57:38 +01:00 committed by QuentinArguillere
parent e2233674ae
commit f8d93b8070
2 changed files with 9 additions and 13 deletions

View file

@ -157,7 +157,6 @@ import AVFoundation
super.viewDidLoad(
backAction: {
self.goBackChatListView()
},
action1: {
self.onCallClick(cChatRoom: self.chatRoom?.getCobject)
@ -267,6 +266,8 @@ import AVFoundation
}
self.messageView.pictureButton.isEnabled = true
isComposingTextView.text = ""
workItem?.cancel()
for progressItem in progress{
progressItem.cancel()
@ -826,7 +827,6 @@ import AVFoundation
}
composingAddresses = composingAddresses! + FastAddressBook.displayName(for: addressItem.getCobject)
})
isComposingTextView.text = String.localizedStringWithFormat(NSLocalizedString("%@ are writing...", comment: ""), composingAddresses!)
}
}
@ -867,7 +867,7 @@ import AVFoundation
replyContentTextView.text = content
replyContentForMeetingTextView.text = content
replyBubble.backgroundColor = (linphone_chat_message_is_outgoing(message) != 0) ? UIColor("A").withAlphaComponent(0.2) : UIColor("D").withAlphaComponent(0.2)
backgroundReplyColor.backgroundColor = (linphone_chat_message_is_outgoing(message) != 0) ? UIColor("A").withAlphaComponent(0.2) : UIColor("D").withAlphaComponent(0.2)
replyDeleteButton.isHidden = false
replyDeleteButton.onClickAction = {

View file

@ -48,6 +48,7 @@ import SnapKit
let mediaSelector = UIView()
let mediaSelectorReply = UIView()
var replyBubble = UIView()
var backgroundReplyColor = UIView()
var backAction : (() -> Void)? = nil
var action1 : (() -> Void)? = nil
var action2 : (() -> Void)? = nil
@ -163,13 +164,15 @@ import SnapKit
isComposingTextView.alignParentLeft(withMargin: 10).alignParentRight(withMargin: 10).alignParentTop(withMargin: 10).matchParentHeight().done()
isComposingView.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
stackView.addArrangedSubview(replyBubble)
replyBubble.matchParentSideBorders().maxHeight(top_bar_height*3).done()
replyBubble.translatesAutoresizingMaskIntoConstraints = false
replyBubble.backgroundColor = VoipTheme.voipToolbarBackgroundColor.get()
replyBubble.backgroundColor = VoipTheme.backgroundWhiteBlack.get()
replyBubble.isHidden = true
replyBubble.addSubview(backgroundReplyColor)
backgroundReplyColor.matchParentSideBorders().matchParentHeight().done()
stackViewReply.axis = .vertical;
stackViewReply.distribution = .fill;
stackViewReply.alignment = .leading;
@ -231,15 +234,8 @@ import SnapKit
stackView.centerXAnchor.constraint(equalTo:self.view.centerXAnchor).isActive = true
stackView.centerYAnchor.constraint(equalTo:self.view.centerYAnchor).isActive = true
view.bringSubviewToFront(isComposingView)
view.bringSubviewToFront(mediaSelector)
view.bringSubviewToFront(replyBubble)
view.bringSubviewToFront(messageView)
view.bringSubviewToFront(contentView)
view.bringSubviewToFront(topBar)
}
override func viewWillAppear(_ animated: Bool) {