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

89 lines
4.0 KiB
Diff
Raw Normal View History

2024-01-25 14:11:07 +00:00
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
2024-01-25 14:11:07 +00:00
--- 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
2024-01-25 14:11:07 +00:00
- (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
2024-01-25 14:11:07 +00:00
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
2024-01-25 14:11:07 +00:00
@@ -111,44 +111,57 @@ - (void)setHeight:(CGFloat)height
_height = height;
[self invalidateIntrinsicContentSize];
+ [_delegate ObservingInputAccessoryViewTempDidChangeFrame:self];
}
- (void)_keyboardWillShowNotification:(NSNotification*)notification
{
- _keyboardState = KeyboardStateWillShow;
2024-01-25 14:11:07 +00:00
+ if (_keyboardState == KeyboardStateHidden) {
+ _keyboardState = KeyboardStateWillShow;
2024-01-25 14:11:07 +00:00
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
2024-01-25 14:11:07 +00:00
- 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;
2024-01-25 14:11:07 +00:00
+ if (_keyboardState == KeyboardStateWillShow) {
+ _keyboardState = KeyboardStateShown;
2024-01-25 14:11:07 +00:00
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
+ }
}
- (void)_keyboardWillHideNotification:(NSNotification*)notification
2024-01-25 14:11:07 +00:00
{
- _keyboardState = KeyboardStateWillHide;
+ if (_keyboardState == KeyboardStateShown) {
+ _keyboardState = KeyboardStateWillHide;
2024-01-25 14:11:07 +00:00
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
2024-01-25 14:11:07 +00:00
- 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;
2024-01-25 14:11:07 +00:00
- [self invalidateIntrinsicContentSize];
+ [self invalidateIntrinsicContentSize];
+
+ [_delegate ObservingInputAccessoryViewTempDidChangeFrame:self];
+ }
}
- (void)_keyboardWillChangeFrameNotification:(NSNotification*)notification