Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

vertical padding is borked on new attachment UI after going into file selector and out again #794

Merged
merged 8 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Changes to be released in next version
*

🐛 Bugfix
*
* vertical padding is borked on new attachment UI after going into file selector and out again (vector-im/element-ios/issues/4156).

⚠️ API Changes
*
Expand Down
6 changes: 1 addition & 5 deletions MatrixKit/Controllers/MXKViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,9 @@ - (void)onKeyboardWillShow:(NSNotification *)notif

// Detect if an external keyboard is used by checking that
// the bottom of the provided keyboard frame is outside of the screen
gileluard marked this conversation as resolved.
Show resolved Hide resolved
BOOL hasExternalKeyboard = NO;
CGRect keyboard = [self.view convertRect:endRect fromView:self.view.window];
CGFloat height = self.view.frame.size.height;
if ((keyboard.origin.y + keyboard.size.height) > height)
{
hasExternalKeyboard = YES;
}
BOOL hasExternalKeyboard = keyboard.size.height <= 80;
gileluard marked this conversation as resolved.
Show resolved Hide resolved

// Get the animation info
NSNumber *curveValue = [[notif userInfo] objectForKey:UIKeyboardAnimationCurveUserInfoKey];
Expand Down