about summary refs log tree commit diff
path: root/patches/@mattermost+react-native-paste-input+0.7.1.patch
diff options
context:
space:
mode:
authorhailey <me@haileyok.com>2025-06-12 10:46:22 -0700
committerGitHub <noreply@github.com>2025-06-12 10:46:22 -0700
commit477e5f4ecfaa0007aeed90b51274c78a730c1a9e (patch)
tree45cd5cfff9eab1bd52b5ade6c60efebe3cc5e6b6 /patches/@mattermost+react-native-paste-input+0.7.1.patch
parenta26b20b56cd0ac80f625a5eb5136b805b9341e8d (diff)
downloadvoidsky-477e5f4ecfaa0007aeed90b51274c78a730c1a9e.tar.zst
new arch (#8295)
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Co-authored-by: Charlotte Som <charlotte@som.codes>
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'patches/@mattermost+react-native-paste-input+0.7.1.patch')
-rw-r--r--patches/@mattermost+react-native-paste-input+0.7.1.patch157
1 files changed, 0 insertions, 157 deletions
diff --git a/patches/@mattermost+react-native-paste-input+0.7.1.patch b/patches/@mattermost+react-native-paste-input+0.7.1.patch
deleted file mode 100644
index f25b6a776..000000000
--- a/patches/@mattermost+react-native-paste-input+0.7.1.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-diff --git a/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m b/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
-index e916023..5049c33 100644
---- a/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
-+++ b/node_modules/@mattermost/react-native-paste-input/ios/PasteInputView.m
-@@ -4,6 +4,7 @@
- //
- //  Created by Elias Nahum on 04-11-20.
- //  Copyright © 2020 Facebook. All rights reserved.
-+//  Updated to remove parent’s default text view
- //
- 
- #import "PasteInputView.h"
-@@ -12,49 +13,78 @@
- 
- @implementation PasteInputView
- {
--    PasteInputTextView *_backedTextInputView;
-+  // We'll store the custom text view in this ivar
-+  PasteInputTextView *_customBackedTextView;
- }
- 
- - (instancetype)initWithBridge:(RCTBridge *)bridge
- {
-+  // Must call the super’s designated initializer
-   if (self = [super initWithBridge:bridge]) {
--    _backedTextInputView = [[PasteInputTextView alloc] initWithFrame:self.bounds];
--    _backedTextInputView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
--    _backedTextInputView.textInputDelegate = self;
-+    // 1. The parent (RCTMultilineTextInputView) has already created
-+    //    its own _backedTextInputView = [RCTUITextView new] in super init.
-+    //    We can remove that subview:
- 
--    [self addSubview:_backedTextInputView];
--  }
-+    id<RCTBackedTextInputViewProtocol> parentInputView = super.backedTextInputView;
-+    if ([parentInputView isKindOfClass:[UIView class]]) {
-+      UIView *parentSubview = (UIView *)parentInputView;
-+      if (parentSubview.superview == self) {
-+        [parentSubview removeFromSuperview];
-+      }
-+    }
- 
-+    // 2. Now create our custom PasteInputTextView
-+    _customBackedTextView = [[PasteInputTextView alloc] initWithFrame:self.bounds];
-+    _customBackedTextView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
-+    _customBackedTextView.textInputDelegate = self;
-+
-+    // Optional: disable inline predictions for iOS 17+
-+    if (@available(iOS 17.0, *)) {
-+      _customBackedTextView.inlinePredictionType = UITextInlinePredictionTypeNo;
-+    }
-+
-+    // 3. Add your custom text view as the only subview
-+    [self addSubview:_customBackedTextView];
-+  }
-   return self;
- }
- 
-+/**
-+ * Override the parent's accessor so that anywhere in RN that calls
-+ * `self.backedTextInputView` will get the custom PasteInputTextView.
-+ */
- - (id<RCTBackedTextInputViewProtocol>)backedTextInputView
- {
--  return _backedTextInputView;
-+  return _customBackedTextView;
- }
- 
--- (void)setDisableCopyPaste:(BOOL)disableCopyPaste {
--    _backedTextInputView.disableCopyPaste = disableCopyPaste;
-+#pragma mark - Setters for React Props
-+
-+- (void)setDisableCopyPaste:(BOOL)disableCopyPaste
-+{
-+  _customBackedTextView.disableCopyPaste = disableCopyPaste;
- }
- 
--- (void)setOnPaste:(RCTDirectEventBlock)onPaste {
--    _backedTextInputView.onPaste = onPaste;
-+- (void)setOnPaste:(RCTDirectEventBlock)onPaste
-+{
-+  _customBackedTextView.onPaste = onPaste;
- }
- 
--- (void)setSmartPunctuation:(NSString *)smartPunctuation {
--    if ([smartPunctuation isEqualToString:@"enable"]) {
--        [_backedTextInputView setSmartDashesType:UITextSmartDashesTypeYes];
--        [_backedTextInputView setSmartQuotesType:UITextSmartQuotesTypeYes];
--        [_backedTextInputView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeYes];
--    } else if ([smartPunctuation isEqualToString:@"disable"]) {
--        [_backedTextInputView setSmartDashesType:UITextSmartDashesTypeNo];
--        [_backedTextInputView setSmartQuotesType:UITextSmartQuotesTypeNo];
--        [_backedTextInputView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeNo];
--    } else {
--        [_backedTextInputView setSmartDashesType:UITextSmartDashesTypeDefault];
--        [_backedTextInputView setSmartQuotesType:UITextSmartQuotesTypeDefault];
--        [_backedTextInputView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeDefault];
--    }
-+- (void)setSmartPunctuation:(NSString *)smartPunctuation
-+{
-+  if ([smartPunctuation isEqualToString:@"enable"]) {
-+    [_customBackedTextView setSmartDashesType:UITextSmartDashesTypeYes];
-+    [_customBackedTextView setSmartQuotesType:UITextSmartQuotesTypeYes];
-+    [_customBackedTextView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeYes];
-+  } else if ([smartPunctuation isEqualToString:@"disable"]) {
-+    [_customBackedTextView setSmartDashesType:UITextSmartDashesTypeNo];
-+    [_customBackedTextView setSmartQuotesType:UITextSmartQuotesTypeNo];
-+    [_customBackedTextView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeNo];
-+  } else {
-+    [_customBackedTextView setSmartDashesType:UITextSmartDashesTypeDefault];
-+    [_customBackedTextView setSmartQuotesType:UITextSmartQuotesTypeDefault];
-+    [_customBackedTextView setSmartInsertDeleteType:UITextSmartInsertDeleteTypeDefault];
-+  }
- }
- 
- #pragma mark - UIScrollViewDelegate
-@@ -62,7 +92,6 @@
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView
- {
-   RCTDirectEventBlock onScroll = self.onScroll;
--
-   if (onScroll) {
-     CGPoint contentOffset = scrollView.contentOffset;
-     CGSize contentSize = scrollView.contentSize;
-@@ -71,22 +100,22 @@
- 
-     onScroll(@{
-       @"contentOffset": @{
--        @"x": @(contentOffset.x),
--        @"y": @(contentOffset.y)
-+          @"x": @(contentOffset.x),
-+          @"y": @(contentOffset.y)
-       },
-       @"contentInset": @{
--        @"top": @(contentInset.top),
--        @"left": @(contentInset.left),
--        @"bottom": @(contentInset.bottom),
--        @"right": @(contentInset.right)
-+          @"top": @(contentInset.top),
-+          @"left": @(contentInset.left),
-+          @"bottom": @(contentInset.bottom),
-+          @"right": @(contentInset.right)
-       },
-       @"contentSize": @{
--        @"width": @(contentSize.width),
--        @"height": @(contentSize.height)
-+          @"width": @(contentSize.width),
-+          @"height": @(contentSize.height)
-       },
-       @"layoutMeasurement": @{
--        @"width": @(size.width),
--        @"height": @(size.height)
-+          @"width": @(size.width),
-+          @"height": @(size.height)
-       },
-       @"zoomScale": @(scrollView.zoomScale ?: 1),
-     });