Fix various minor bugs
This commit is contained in:
parent
b85941b722
commit
7b01b65908
|
@ -127,7 +127,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
|
|||
view.addSubview(messagesTableView)
|
||||
messagesTableView.pin(to: view)
|
||||
view.addSubview(scrollButton)
|
||||
scrollButton.pin(.right, to: .right, of: view, withInset: -Values.mediumSpacing)
|
||||
scrollButton.pin(.right, to: .right, of: view, withInset: -22)
|
||||
// Blocked banner
|
||||
addOrRemoveBlockedBanner()
|
||||
// Notifications
|
||||
|
@ -208,7 +208,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
|
|||
guard let newHeight = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue.size.height else { return }
|
||||
if !didConstrainScrollButton {
|
||||
// Bit of a hack to do this here, but it works out.
|
||||
scrollButton.pin(.bottom, to: .bottom, of: view, withInset: -(newHeight + Values.mediumSpacing))
|
||||
scrollButton.pin(.bottom, to: .bottom, of: view, withInset: -(newHeight + 22))
|
||||
didConstrainScrollButton = true
|
||||
}
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
|
|
|
@ -47,6 +47,7 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate,
|
|||
let blurView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
|
||||
result.addSubview(blurView)
|
||||
blurView.pin(to: result)
|
||||
result.alpha = 0
|
||||
return result
|
||||
}()
|
||||
|
||||
|
@ -109,7 +110,7 @@ final class InputView : UIView, InputViewButtonDelegate, InputTextViewDelegate,
|
|||
mainStackView.pin([ UIView.HorizontalEdge.leading, UIView.HorizontalEdge.trailing ], to: self)
|
||||
mainStackView.pin(.bottom, to: .bottom, of: self, withInset: -2)
|
||||
// Mentions
|
||||
addSubview(mentionsViewContainer)
|
||||
insertSubview(mentionsViewContainer, belowSubview: mainStackView)
|
||||
mentionsViewContainer.pin([ UIView.HorizontalEdge.left, UIView.HorizontalEdge.right ], to: self)
|
||||
mentionsViewContainer.pin(.bottom, to: .top, of: self)
|
||||
mentionsViewContainer.addSubview(mentionsView)
|
||||
|
|
|
@ -37,6 +37,16 @@ final class InputViewButton : UIView {
|
|||
|
||||
private func setUpViewHierarchy() {
|
||||
backgroundColor = .clear
|
||||
if hasOpaqueBackground {
|
||||
let backgroundView = UIView()
|
||||
backgroundView.backgroundColor = isLightMode ? .white : .black
|
||||
backgroundView.alpha = Values.lowOpacity
|
||||
addSubview(backgroundView)
|
||||
backgroundView.pin(to: self)
|
||||
let blurView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
|
||||
addSubview(blurView)
|
||||
blurView.pin(to: self)
|
||||
}
|
||||
backgroundView.backgroundColor = isSendButton ? Colors.accent : Colors.text.withAlphaComponent(0.05)
|
||||
addSubview(backgroundView)
|
||||
backgroundView.pin(to: self)
|
||||
|
|
Loading…
Reference in New Issue