Revert the fix for keyboard stickiness, rename inputAccessoryView

This commit is contained in:
ismailgulek
2022-08-15 14:49:24 +03:00
parent 2a329dedb5
commit 6783a77e3d
5 changed files with 10 additions and 7 deletions
@@ -205,7 +205,7 @@ typedef enum : NSUInteger
UIView *messageComposerContainer;
@protected
UIView *inputAccessoryView;
UIView *inputAccessoryViewForKeyboard;
}
/**
@@ -333,7 +333,7 @@ typedef enum : NSUInteger
actually used to retrieve the keyboard view. Indeed the keyboard view is the superview of
the accessory view when the message composer become the first responder.
*/
@property (readonly) UIView *inputAccessoryView;
@property (readonly) UIView *inputAccessoryViewForKeyboard;
/**
Display the keyboard.
@@ -61,7 +61,7 @@
@end
@implementation MXKRoomInputToolbarView
@synthesize messageComposerContainer, inputAccessoryView;
@synthesize messageComposerContainer, inputAccessoryViewForKeyboard;
+ (UINib *)nib
{
@@ -103,7 +103,7 @@
- (void)dealloc
{
inputAccessoryView = nil;
inputAccessoryViewForKeyboard = nil;
[self destroy];
}
@@ -30,8 +30,8 @@
[super awakeFromNib];
// Add an accessory view to the text view in order to retrieve keyboard view.
inputAccessoryView = [[UIView alloc] initWithFrame:CGRectZero];
self.messageComposerTextView.inputAccessoryView = self.inputAccessoryView;
inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero];
self.messageComposerTextView.inputAccessoryView = inputAccessoryViewForKeyboard;
}
-(void)customizeViewRendering
+1 -1
View File
@@ -495,7 +495,7 @@
if (!keyboardView)
{
// Check whether the first responder is the input tool bar text composer
keyboardView = inputToolbarView.inputAccessoryView.superview;
keyboardView = inputToolbarView.inputAccessoryViewForKeyboard.superview;
}
// Report the keyboard view in order to track keyboard frame changes
@@ -80,6 +80,9 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
[self updateUIWithAttributedTextMessage:nil animated:NO];
self.textView.toolbarDelegate = self;
inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero];
self.textView.inputAccessoryView = inputAccessoryViewForKeyboard;
}
- (void)setVoiceMessageToolbarView:(UIView *)voiceMessageToolbarView