Rocket.Chat.ReactNative/patches/react-native-ui-lib+7.0.0.p...

89 lines
4.0 KiB
Diff

diff --git a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m
index 97255d2..4e0fe05 100644
--- a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m
+++ b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/KeyboardTrackingViewTempManager.m
@@ -364,6 +364,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
- (void)ObservingInputAccessoryViewTempKeyboardWillDisappear:(ObservingInputAccessoryViewTemp *)ObservingInputAccessoryViewTemp
{
_bottomViewHeight = kBottomViewHeightTemp;
+ _ObservingInputAccessoryViewTemp.height = 0;
[self updateBottomViewFrame];
}
diff --git a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m
index 1ca52e8..69ac77a 100644
--- a/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m
+++ b/node_modules/react-native-ui-lib/lib/ios/reactnativeuilib/keyboardtrackingview/ObservingInputAccessoryViewTemp.m
@@ -111,44 +111,57 @@ - (void)setHeight:(CGFloat)height
_height = height;
[self invalidateIntrinsicContentSize];
+ [_delegate ObservingInputAccessoryViewTempDidChangeFrame:self];
}
- (void)_keyboardWillShowNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateWillShow;
+ if (_keyboardState == KeyboardStateHidden) {
+ _keyboardState = KeyboardStateWillShow;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
- if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillAppear:keyboardDelta:)])
- {
- [_delegate ObservingInputAccessoryViewTempKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight];
+ if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillAppear:keyboardDelta:)])
+ {
+ [_delegate ObservingInputAccessoryViewTempKeyboardWillAppear:self keyboardDelta:_keyboardHeight - _previousKeyboardHeight];
+ }
}
}
- (void)_keyboardDidShowNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateShown;
+ if (_keyboardState == KeyboardStateWillShow) {
+ _keyboardState = KeyboardStateShown;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
+ }
}
- (void)_keyboardWillHideNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateWillHide;
+ if (_keyboardState == KeyboardStateShown) {
+ _keyboardState = KeyboardStateWillHide;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
- if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillDisappear:)])
- {
- [_delegate ObservingInputAccessoryViewTempKeyboardWillDisappear:self];
+ [_delegate ObservingInputAccessoryViewTempDidChangeFrame:self];
+
+ if([_delegate respondsToSelector:@selector(ObservingInputAccessoryViewTempKeyboardWillDisappear:)])
+ {
+ [_delegate ObservingInputAccessoryViewTempKeyboardWillDisappear:self];
+ }
}
}
- (void)_keyboardDidHideNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateHidden;
+ if (_keyboardState == KeyboardStateWillHide) {
+ _keyboardState = KeyboardStateHidden;
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
+
+ [_delegate ObservingInputAccessoryViewTempDidChangeFrame:self];
+ }
}
- (void)_keyboardWillChangeFrameNotification:(NSNotification*)notification