From 220a9ac4a1623a61a3fbf3d8392b3fe3e4c1658b Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 20 Jun 2022 11:24:04 +1000 Subject: [PATCH] ui: fix in context menu vc emoji bar may be out of screen --- Session/Conversations/Context Menu/ContextMenuVC.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Session/Conversations/Context Menu/ContextMenuVC.swift b/Session/Conversations/Context Menu/ContextMenuVC.swift index 7aee8bdc5..45c2c9f12 100644 --- a/Session/Conversations/Context Menu/ContextMenuVC.swift +++ b/Session/Conversations/Context Menu/ContextMenuVC.swift @@ -139,11 +139,11 @@ final class ContextMenuVC : UIViewController { let spacing = Values.smallSpacing let margin = max(UIApplication.shared.keyWindow!.safeAreaInsets.bottom, Values.mediumSpacing) if frame.maxY + spacing + menuHeight > UIScreen.main.bounds.height - margin { - menuView.pin(.bottom, to: .top, of: snapshot, withInset: -spacing) - emojiBar.pin(.top, to: .bottom, of: snapshot, withInset: spacing) - } else { - menuView.pin(.top, to: .bottom, of: snapshot, withInset: spacing) emojiBar.pin(.bottom, to: .top, of: snapshot, withInset: -spacing) + menuView.pin(.bottom, to: .top, of: emojiBar, withInset: -spacing) + } else { + emojiBar.pin(.top, to: .bottom, of: snapshot, withInset: spacing) + menuView.pin(.top, to: .bottom, of: emojiBar, withInset: spacing) } switch viewItem.interaction.interactionType() { case .outgoingMessage: