Compare commits

...

7 Commits

Author SHA1 Message Date
xmflsct 53ebeef3d5
Merge b70894397e into 7bcef6fe1d 2024-02-07 00:27:13 +01:00
xmflsct 7bcef6fe1d
Fix patch 2024-02-07 00:26:41 +01:00
xmflsct 6f27785a12
Try fixing navigation 2024-02-07 00:22:22 +01:00
xmflsct 5cec5e8084
Clean up 2024-02-06 22:09:36 +01:00
xmflsct 7b63150e73
Squashed commit of the following:
commit 37d93d723606fc3b43ec3e0379e0a87b27afac72
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 01:14:40 2024 +0100

    Match Android

commit 3a192afc7704fcab7ddd14c5496ad68eac12405c
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:33:38 2024 +0100

    Updates

commit 84617bdadf7fd0ba6474e610a174decc92015b0b
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:24:56 2024 +0100

    Updates

commit 9919e8890e02e7d583046e22e3dbe34af02e3f28
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:19:19 2024 +0100

    Updates

commit fca65a03665f4162696dc50c16098bc28f336f31
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:13:20 2024 +0100

    Updates

commit d208d67a052464939197a15877f67302f262c222
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:09:05 2024 +0100

    Updates

commit 5527ebca78d863515848521571657f1eac628de4
Author: xmflsct <me@xmflsct.com>
Date:   Mon Feb 5 00:03:19 2024 +0100

    Bump core
2024-02-05 01:14:54 +01:00
xmflsct 997a267b89
Update Gemfile.lock 2024-02-04 12:51:44 +01:00
xmflsct 41c09d4ae9
Bump building chain 2024-02-04 12:39:10 +01:00
60 changed files with 5992 additions and 5626 deletions

View File

@ -7,12 +7,12 @@ on:
jobs:
build-ios:
runs-on: macos-13
runs-on: macos-14
steps:
- uses: tj-actions/branch-names@v6
- uses: tj-actions/branch-names@v8
id: branch
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: corepack enable
@ -20,7 +20,7 @@ jobs:
- run: bundle install
- run: yarn app:build ios
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer
ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.current_branch }}
LC_ALL: en_US.UTF-8
@ -38,18 +38,18 @@ jobs:
GH_PAT_GET_RELEASE: ${{ secrets.GITHUB_TOKEN }}
build-android:
runs-on: macos-13
runs-on: macos-14
steps:
- uses: tj-actions/branch-names@v6
- uses: tj-actions/branch-names@v8
id: branch
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- run: corepack enable
- run: yarn install
- run: bundle install
@ -67,19 +67,19 @@ jobs:
GH_PAT_GET_RELEASE: ${{ secrets.GITHUB_TOKEN }}
create-release:
runs-on: macos-13
runs-on: macos-14
needs: [build-ios, build-android]
steps:
- uses: tj-actions/branch-names@v6
- uses: tj-actions/branch-names@v8
id: branch
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
- run: corepack enable
- run: yarn install
- run: bundle install

2
.nvmrc
View File

@ -1 +1 @@
18
20

View File

@ -1,50 +0,0 @@
diff --git a/src/android.js b/src/android.js
index fbf09855771f985c5edfc53c22cf6cfe828f45f9..7751d456e08e2dc4c78601fc9430fdbf1373e0d4 100644
--- a/src/android.js
+++ b/src/android.js
@@ -16,7 +16,7 @@ import TextAncestor from 'react-native/Libraries/Text/TextAncestor';
import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState';
import invariant from 'invariant';
import nullthrows from 'nullthrows';
-import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef';
+import setAndForwardRef from './setAndForwardRef';
import usePressability from 'react-native/Libraries/Pressability/usePressability';
diff --git a/src/ios.tsx b/src/ios.tsx
index b9ed28bbf9fca6fb44c27096e771d8d2b65b858f..588a75c82b2ee1123d3e48acb984bcbc8b293cc8 100644
--- a/src/ios.tsx
+++ b/src/ios.tsx
@@ -11,7 +11,7 @@ import {
} from 'react-native';
import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState';
import TextAncestor from 'react-native/Libraries/Text/TextAncestor';
-import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef';
+import setAndForwardRef from './setAndForwardRef';
import { getTextInputExtraProps } from './extra_props';
import type {
diff --git a/src/setAndForwardRef.js b/src/setAndForwardRef.js
new file mode 100644
index 0000000000000000000000000000000000000000..ad7777e271b945c7123953f7578a8d1208ca9e48
--- /dev/null
+++ b/src/setAndForwardRef.js
@@ -0,0 +1,17 @@
+function setAndForwardRef({ getForwardedRef, setLocalRef }) {
+ return function forwardRef(ref) {
+ const forwardedRef = getForwardedRef();
+
+ setLocalRef(ref);
+
+ // Forward to user ref prop (if one has been specified)
+ if (typeof forwardedRef === 'function') {
+ // Handle function-based refs. String-based refs are handled as functions.
+ forwardedRef(ref);
+ } else if (typeof forwardedRef === 'object' && forwardedRef != null) {
+ // Handle createRef-based refs
+ forwardedRef.current = ref;
+ }
+ };
+}
+export default setAndForwardRef;
\ No newline at end of file

View File

@ -1,13 +0,0 @@
diff --git a/ios/EXAV/EXAudioSessionManager.m b/ios/EXAV/EXAudioSessionManager.m
index 81dce13366c3947b12c863f7b39c0237882a6c36..fa27e0a354d48a994ca46e19642a5e224d42d9a8 100644
--- a/ios/EXAV/EXAudioSessionManager.m
+++ b/ios/EXAV/EXAudioSessionManager.m
@@ -170,7 +170,7 @@ - (void)moduleDidBackground:(id)backgroundingModule
[_foregroundedModules compact];
// Any possible failures are silent
- [self _updateSessionConfiguration];
+ // [self _updateSessionConfiguration];
}
- (void)moduleDidForeground:(id)module

View File

@ -1,14 +0,0 @@
diff --git a/src/functions/Helpers.ts b/src/functions/Helpers.ts
index e04486540494891ab07ec130b686dc4acddf2d0c..265e6ac11439276a1c52c222dfc4c50daf1689ae 100644
--- a/src/functions/Helpers.ts
+++ b/src/functions/Helpers.ts
@@ -77,7 +77,8 @@ export function getNativeNodeHandle(nativeRef: React.Component){
const nodeHandle = findNodeHandle(nativeRef);
if(nodeHandle == null){
- throw new Error('Unable to get the node handle for the native ref.');
+ return 0
+ // throw new Error('Unable to get the node handle for the native ref.');
};
return nodeHandle;

View File

@ -0,0 +1,64 @@
diff --git a/ios/Sources/Common/AutoLayoutWrapperView.swift b/ios/Sources/Common/AutoLayoutWrapperView.swift
index e2b9be9c129c66eed3eaebb4e33f5456ce98f5da..ef6a0087f524c8d228b7fee31e54fc3dba769ffa 100644
--- a/ios/Sources/Common/AutoLayoutWrapperView.swift
+++ b/ios/Sources/Common/AutoLayoutWrapperView.swift
@@ -18,7 +18,11 @@ class AutoLayoutWrapperView: UIView {
override func addSubview(_ view: UIView) {
if let detachedView = view as? RNIDetachedView {
- detachedView.updateBounds(newSize: self.bounds.size);
+ do {
+ try detachedView.updateBounds(newSize: self.bounds.size);
+ } catch {
+ print("Error: \(error)");
+ };
};
super.addSubview(view);
@@ -37,7 +41,11 @@ class AutoLayoutWrapperView: UIView {
func updateSizeOfSubviews(newSize: CGSize? = nil){
self.subviews.forEach {
guard let detachedView = $0 as? RNIDetachedView else { return };
- detachedView.updateBounds(newSize: newSize ?? self.bounds.size);
+ do {
+ try detachedView.updateBounds(newSize: newSize ?? self.bounds.size);
+ } catch {
+ print("Error: \(error)");
+ };
};
};
};
diff --git a/ios/Sources/RNIContextMenuView/RNIContextMenuPreviewController.swift b/ios/Sources/RNIContextMenuView/RNIContextMenuPreviewController.swift
index 2b4dc6287c68c88d6652b963ac2cc5f59251ffa9..7c8472e90dac8359f6b40ce2c096323fcf388249 100644
--- a/ios/Sources/RNIContextMenuView/RNIContextMenuPreviewController.swift
+++ b/ios/Sources/RNIContextMenuView/RNIContextMenuPreviewController.swift
@@ -63,7 +63,11 @@ class RNIContextMenuPreviewController: UIViewController {
case .STRETCH:
guard let menuCustomPreviewView = self.menuCustomPreviewView else { return };
- menuCustomPreviewView.updateBounds(newSize: self.view.bounds.size);
+ do {
+ try menuCustomPreviewView.updateBounds(newSize: self.view.bounds.size);
+ } catch {
+ print("Error: \(error)");
+ };
self.preferredContentSize = .zero;
case .INHERIT:
diff --git a/ios/Sources/RNIContextMenuView/RNIContextMenuView.swift b/ios/Sources/RNIContextMenuView/RNIContextMenuView.swift
index affabcdee8303681f1438c6cfdb9d90d6a105ba6..7c470229e06250f4bd80d3133e381b91ff4f61c5 100644
--- a/ios/Sources/RNIContextMenuView/RNIContextMenuView.swift
+++ b/ios/Sources/RNIContextMenuView/RNIContextMenuView.swift
@@ -307,7 +307,11 @@ public class RNIContextMenuView:
.init(with: detachedView)
);
- detachedView.detach();
+ do {
+ try detachedView.detach();
+ } catch {
+ print("Error: \(error)");
+ };
};
#if DEBUG

View File

@ -1,74 +0,0 @@
diff --git a/Libraries/Utilities/setAndForwardRef.js b/Libraries/Utilities/setAndForwardRef.js
new file mode 100644
index 0000000000000000000000000000000000000000..e67b530b9a933b68e219e2b8cec2a66dc8f51323
--- /dev/null
+++ b/Libraries/Utilities/setAndForwardRef.js
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ * @format
+ * @flow
+ */
+
+'use strict'
+
+import type { ElementRef, Ref } from 'react'
+
+type Args = $ReadOnly<{|
+ getForwardedRef: () => ?Ref<any>,
+ setLocalRef: (ref: ElementRef<any>) => mixed
+|}>
+
+/**
+ * This is a helper function for when a component needs to be able to forward a ref
+ * to a child component, but still needs to have access to that component as part of
+ * its implementation.
+ *
+ * Its main use case is in wrappers for native components.
+ *
+ * Usage:
+ *
+ * class MyView extends React.Component {
+ * _nativeRef = null;
+ *
+ * _setNativeRef = setAndForwardRef({
+ * getForwardedRef: () => this.props.forwardedRef,
+ * setLocalRef: ref => {
+ * this._nativeRef = ref;
+ * },
+ * });
+ *
+ * render() {
+ * return <View ref={this._setNativeRef} />;
+ * }
+ * }
+ *
+ * const MyViewWithRef = React.forwardRef((props, ref) => (
+ * <MyView {...props} forwardedRef={ref} />
+ * ));
+ *
+ * module.exports = MyViewWithRef;
+ */
+
+function setAndForwardRef({ getForwardedRef, setLocalRef }: Args): (ref: ElementRef<any>) => void {
+ return function forwardRef(ref: ElementRef<any>) {
+ const forwardedRef = getForwardedRef()
+
+ setLocalRef(ref)
+
+ // Forward to user ref prop (if one has been specified)
+ if (typeof forwardedRef === 'function') {
+ // Handle function-based refs. String-based refs are handled as functions.
+ forwardedRef(ref)
+ } else if (typeof forwardedRef === 'object' && forwardedRef != null) {
+ // Handle createRef-based refs
+ forwardedRef.current = ref
+ }
+ }
+}
+
+module.exports = setAndForwardRef

View File

@ -35,4 +35,4 @@ index 70ce1c8d6a43e711f06b93d1eda3b44a3ad9a659..cdc2713470f2d332b8bf3e9c97e38fd9
+ });
});
const pinch = Gesture.Pinch()
const pinch = Gesture.Pinch()

File diff suppressed because one or more lines are too long

893
.yarn/releases/yarn-4.1.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -4,4 +4,4 @@ enableGlobalCache: false
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.0.1.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs

View File

@ -1,6 +1,13 @@
source "https://rubygems.org"
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem "fastlane"
gem 'cocoapods', '~> 1.12'
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

View File

@ -8,37 +8,37 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.785.0)
aws-sdk-core (3.178.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-eventstream (1.3.0)
aws-partitions (1.887.0)
aws-sdk-core (3.191.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.129.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
aws-sigv4 (1.6.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
cocoapods (1.12.0)
cocoapods (1.14.3)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.12.0)
cocoapods-core (= 1.14.3)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
@ -50,8 +50,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.12.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.14.3)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
@ -62,7 +62,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
@ -78,14 +78,13 @@ GEM
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.100.0)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
@ -114,8 +113,8 @@ GEM
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.7)
fastlane (2.213.0)
fastimage (2.3.0)
fastlane (2.219.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
@ -134,20 +133,22 @@ GEM
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
optparse (>= 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
@ -159,13 +160,13 @@ GEM
os (~> 1.1, >= 1.1.4)
fastlane-plugin-versioning_android (0.1.1)
fastlane-plugin-yarn (1.2)
ffi (1.15.5)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.45.0)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
@ -173,31 +174,29 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.6.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
@ -208,11 +207,10 @@ GEM
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.6.3)
json (2.7.1)
jwt (2.7.1)
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_mime (1.1.5)
minitest (5.18.0)
molinillo (0.8.0)
multi_json (1.15.0)
@ -221,23 +219,23 @@ GEM
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
optparse (0.1.1)
optparse (0.4.0)
os (1.1.4)
plist (3.7.0)
plist (3.7.1)
public_suffix (4.0.7)
rake (13.0.6)
rake (13.1.0)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rexml (3.2.6)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
@ -246,25 +244,21 @@ GEM
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.22.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
@ -280,12 +274,16 @@ PLATFORMS
arm64-darwin-22
DEPENDENCIES
cocoapods (~> 1.12)
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (>= 1.13, < 1.15)
fastlane
fastlane-plugin-json
fastlane-plugin-sentry
fastlane-plugin-versioning_android
fastlane-plugin-yarn
RUBY VERSION
ruby 3.1.2p20
BUNDLED WITH
2.3.24

View File

@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: 'com.google.gms.google-services'
@ -70,7 +71,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@ -135,12 +137,8 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
implementation("com.facebook.react:flipper-integration")
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
</manifest>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>

View File

@ -1,72 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.tooot;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
/**
* Class responsible of loading Flipper inside your React Native application. This is the debug
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}

View File

@ -1,40 +0,0 @@
package com.xmflsct.app.tooot;
import expo.modules.ReactActivityDelegateWrapper;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
import expo.modules.ReactActivityDelegateWrapper;
public class MainActivity extends ReactActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "main";
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
* (aka React 18) with two boolean flags.
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled()));
}
}

View File

@ -0,0 +1,61 @@
package com.xmflsct.app.tooot;
import android.os.Build
import android.os.Bundle
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import expo.modules.ReactActivityDelegateWrapper
class MainActivity : ReactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
// Set the theme to AppTheme BEFORE onCreate to support
// coloring the background, status bar, and navigation bar.
// This is required for expo-splash-screen.
setTheme(R.style.AppTheme);
super.onCreate(null)
}
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "main"
/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate {
return ReactActivityDelegateWrapper(
this,
BuildConfig.IS_NEW_ARCHITECTURE_ENABLED,
object : DefaultReactActivityDelegate(
this,
mainComponentName,
fabricEnabled
){})
}
/**
* Align the back button behavior with Android S
* where moving root activities to background instead of finishing activities.
* @see <a href="https://developer.android.com/reference/android/app/Activity#onBackPressed()">onBackPressed</a>
*/
override fun invokeDefaultOnBackPressed() {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
if (!moveTaskToBack(false)) {
// For non-root activities, use the default implementation to finish them.
super.invokeDefaultOnBackPressed()
}
return
}
// Use the default back button implementation on Android S
// because it's doing more than [Activity.moveTaskToBack] in fact.
super.invokeDefaultOnBackPressed()
}
}

View File

@ -1,76 +0,0 @@
package com.xmflsct.app.tooot;
import android.app.Application;
import android.content.res.Configuration;
import androidx.annotation.NonNull;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.soloader.SoLoader;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHostWrapper(
this,
new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
}));
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
// ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
ApplicationLifecycleDispatcher.onApplicationCreate(this);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
}
}

View File

@ -0,0 +1,58 @@
package com.xmflsct.app.tooot;
import android.app.Application
import android.content.res.Configuration
import androidx.annotation.NonNull
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.soloader.SoLoader
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = ReactNativeHostWrapper(
this,
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> {
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return PackageList(this).packages
}
override fun getJSMainModuleName(): String = "index"
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
)
override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}

View File

@ -1,20 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.rndiffapp;
import android.content.Context;
import com.facebook.react.ReactInstanceManager;
/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}

View File

@ -1,16 +1,11 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = '1.8.21'
frescoVersion = '2.5.0'
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = '1.8.0'
}
repositories {
google()
@ -21,5 +16,8 @@ buildscript {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath 'com.google.gms:google-services:4.3.14'
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
apply plugin: "com.facebook.react.rootproject"

View File

@ -25,9 +25,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.182.0
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
@ -43,10 +40,10 @@ newArchEnabled=false
# If set to false, you will be using JSC instead.
hermesEnabled=true
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
# org.gradle.daemon=true
# org.gradle.parallel=true
# org.gradle.configureondemand=true
# The hosted JavaScript engine
# Supported values: expo.jsEngine = "hermes" | "jsc"

Binary file not shown.

View File

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

19
android/gradlew vendored
View File

@ -80,13 +80,10 @@ do
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -133,22 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -193,6 +197,9 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in

View File

@ -1 +1 @@
Enjoy toooting! This version includes following improvements and fixes:
Enjoy toooting! This version includes improvements and fixes.

View File

@ -1 +1 @@
tooot-ing愉快此版本包括以下改进和修复:
tooot-ing愉快此版本包括改进和修复。

View File

@ -7,7 +7,7 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, '13.0'
platform :ios, '13.4'
prepare_react_native_project!
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
@ -23,13 +23,8 @@ target 'tooot' do
use_expo_modules!
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.disabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
@ -41,7 +36,6 @@ target 'tooot' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
# For share extension
installer.pods_project.targets.each do |target|
@ -49,15 +43,6 @@ target 'tooot' do
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
end
end
# For Xcode 14
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
post_integrate do |installer|
@ -71,7 +56,6 @@ end
target 'ShareExtension' do
use_react_native!(
:hermes_enabled => true,
:flipper_configuration => FlipperConfiguration.disabled
)

File diff suppressed because it is too large Load Diff

View File

@ -431,12 +431,14 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-tooot/Pods-tooot-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_ROOT}/Sentry/Sources/Resources/PrivacyInfo.xcprivacy",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/PrivacyInfo.xcprivacy",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@ -472,11 +474,11 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ShareExtension/Pods-ShareExtension-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@ -594,7 +596,7 @@
);
INFOPLIST_FILE = tooot/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -609,8 +611,8 @@
PRODUCT_NAME = tooot;
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc com.xmflsct.app.tooot";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_OBJC_BRIDGING_HEADER = "tooot-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_PRECOMPILE_BRIDGING_HEADER = YES;
@ -634,7 +636,7 @@
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
INFOPLIST_FILE = tooot/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -649,8 +651,8 @@
PRODUCT_NAME = tooot;
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.xmflsct.app.tooot";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_OBJC_BRIDGING_HEADER = "tooot-Bridging-Header.h";
SWIFT_PRECOMPILE_BRIDGING_HEADER = YES;
SWIFT_VERSION = 5.0;
@ -664,7 +666,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@ -720,13 +722,10 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
name = Debug;
};
@ -735,7 +734,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
@ -787,14 +786,11 @@
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -821,8 +817,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -837,7 +832,8 @@
PROVISIONING_PROFILE_SPECIFIER = "match AdHoc com.xmflsct.app.tooot.ShareExtension";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match AdHoc com.xmflsct.app.tooot.ShareExtension";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "ShareExtension/ShareExtension-Bridging-Header.h";
@ -871,8 +867,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
"IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -886,7 +881,8 @@
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.xmflsct.app.tooot.ShareExtension";
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "match AppStore com.xmflsct.app.tooot.ShareExtension";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "ShareExtension/ShareExtension-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";

View File

@ -14,6 +14,10 @@
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self getBundleURL];
}
- (NSURL *)getBundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];

View File

@ -49,14 +49,11 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>

View File

@ -1,6 +1,6 @@
{
"name": "tooot",
"version": "4.10.4",
"version": "4.11.0",
"description": "tooot for Mastodon",
"author": "xmflsct <me@xmflsct.com>",
"license": "GPL-3.0-or-later",
@ -12,111 +12,110 @@
"start": "react-native start",
"android": "react-native run-android",
"phone": "react-native run-ios --device",
"iphone": "react-native run-ios --simulator 'iPhone 14 Pro'",
"iphone": "react-native run-ios --simulator 'iPhone 15 Pro'",
"ipad": "react-native run-ios --simulator 'iPad Pro (11-inch) (4th generation)'",
"app:build": "bundle exec fastlane",
"clean": "react-native-clean-project"
},
"dependencies": {
"@expo/react-native-action-sheet": "^4.0.1",
"@formatjs/intl-datetimeformat": "^6.10.0",
"@formatjs/intl-getcanonicallocales": "^2.2.1",
"@formatjs/intl-locale": "^3.3.2",
"@formatjs/intl-numberformat": "^8.7.0",
"@formatjs/intl-pluralrules": "^5.2.9",
"@formatjs/intl-relativetimeformat": "^11.2.9",
"@mattermost/react-native-paste-input": "^0.6.4",
"@formatjs/intl-datetimeformat": "^6.12.2",
"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^3.4.5",
"@formatjs/intl-numberformat": "^8.10.0",
"@formatjs/intl-pluralrules": "^5.2.12",
"@formatjs/intl-relativetimeformat": "^11.2.12",
"@mattermost/react-native-paste-input": "^0.7.0",
"@neverdull-agency/expo-unlimited-secure-store": "^1.0.10",
"@react-native-async-storage/async-storage": "~1.17.11",
"@react-native-camera-roll/camera-roll": "^5.7.2",
"@react-native-clipboard/clipboard": "^1.11.2",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/netinfo": "^9.4.1",
"@react-native-firebase/app": "^18.3.0",
"@react-native-menu/menu": "^0.8.0",
"@react-native-segmented-control/segmented-control": "^2.4.2",
"@react-native-async-storage/async-storage": "~1.21.0",
"@react-native-camera-roll/camera-roll": "^7.4.0",
"@react-native-clipboard/clipboard": "^1.13.2",
"@react-native-community/blur": "^4.4.0",
"@react-native-community/netinfo": "^11.2.1",
"@react-native-firebase/app": "^18.8.0",
"@react-native-menu/menu": "^0.9.1",
"@react-native-segmented-control/segmented-control": "^2.5.0",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@react-navigation/stack": "^6.3.20",
"@sentry/react-native": "^5.8.0",
"@sharcoux/slider": "^7.0.5",
"@tanstack/react-query": "^4.32.0",
"axios": "^1.4.0",
"@sentry/react-native": "^5.18.0",
"@sharcoux/slider": "^7.1.1",
"@tanstack/react-query": "^4.36.1",
"axios": "^1.6.7",
"diff": "^5.1.0",
"expo": "^49.0.18",
"expo-auth-session": "^5.1.0",
"expo-av": "^13.5.0",
"expo-constants": "^14.5.1",
"expo-crypto": "^12.5.0",
"expo-file-system": "^15.5.0",
"expo-haptics": "^12.4.0",
"expo-image": "^1.4.0",
"expo-linking": "^5.0.2",
"expo-localization": "^14.3.0",
"expo-notifications": "^0.20.1",
"expo-screen-capture": "^5.3.0",
"expo-screen-orientation": "^6.1.0",
"expo-secure-store": "^12.3.1",
"expo-splash-screen": "^0.20.5",
"expo-store-review": "^6.4.0",
"expo-video-thumbnails": "^7.4.0",
"expo-web-browser": "^12.4.0",
"htmlparser2": "^9.0.0",
"i18next": "^23.4.1",
"linkify-it": "^4.0.1",
"expo": "^50.0.6",
"expo-auth-session": "^5.4.0",
"expo-av": "^13.10.5",
"expo-constants": "^15.4.5",
"expo-crypto": "^12.8.0",
"expo-file-system": "^16.0.6",
"expo-haptics": "^12.8.1",
"expo-image": "^1.11.0",
"expo-linking": "^6.2.2",
"expo-localization": "^14.8.3",
"expo-notifications": "^0.27.6",
"expo-screen-capture": "^5.8.1",
"expo-screen-orientation": "^6.4.1",
"expo-secure-store": "^12.8.1",
"expo-splash-screen": "^0.26.4",
"expo-store-review": "^6.8.3",
"expo-video-thumbnails": "^7.9.0",
"expo-web-browser": "^12.8.2",
"htmlparser2": "^9.1.0",
"i18next": "^23.8.2",
"linkify-it": "^5.0.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^13.0.2",
"react-intl": "^6.4.4",
"react-native": "^0.72.6",
"react-i18next": "^14.0.5",
"react-intl": "^6.6.2",
"react-native": "^0.73.4",
"react-native-flash-message": "^0.4.2",
"react-native-gesture-handler": "~2.12.1",
"react-native-image-picker": "^5.6.0",
"react-native-ios-context-menu": "^1.15.3",
"react-native-gesture-handler": "^2.15.0",
"react-native-image-picker": "^7.1.0",
"react-native-ios-context-menu": "^2.3.2",
"react-native-ios-utilities": "^4.3.0",
"react-native-language-detection": "^0.2.2",
"react-native-mmkv": "^2.10.1",
"react-native-pager-view": "^6.2.2",
"react-native-quick-base64": "^2.0.7",
"react-native-reanimated": "^3.4.1",
"react-native-mmkv": "^2.11.0",
"react-native-pager-view": "^6.2.3",
"react-native-quick-base64": "^2.0.8",
"react-native-reanimated": "^3.6.2",
"react-native-reanimated-zoom": "^0.3.3",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.23.0",
"react-native-safe-area-context": "^4.9.0",
"react-native-screens": "^3.29.0",
"react-native-share-menu": "^6.0.0",
"react-native-svg": "^13.10.0",
"react-native-svg": "^14.1.0",
"react-native-swipe-list-view": "^3.2.9",
"react-native-tab-view": "^3.5.2",
"rn-placeholder": "^3.0.3",
"zeego": "^1.6.2"
"zeego": "^1.7.2"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/core": "^7.23.9",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/preset-typescript": "^7.22.5",
"@expo/config": "^8.2.0",
"@react-native/metro-config": "^0.72.11",
"@types/diff": "^5.0.8",
"@babel/preset-typescript": "^7.23.3",
"@expo/config": "^8.5.4",
"@react-native/metro-config": "^0.73.5",
"@react-native/typescript-config": "^0.74.0",
"@types/diff": "^5.0.9",
"@types/linkify-it": "^3.0.5",
"@types/lodash": "^4.14.201",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/lodash": "^4.14.202",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.18",
"@types/react-native-share-menu": "^5.0.5",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"chalk": "^4.1.2",
"dotenv": "^16.3.1",
"react-native-clean-project": "^4.0.1",
"typescript": "^5.1.6"
"dotenv": "^16.4.1",
"react-native-clean-project": "^4.0.3",
"typescript": "^5.3.3"
},
"packageManager": "yarn@4.0.1",
"packageManager": "yarn@4.1.0",
"resolutions": {
"expo-av@^13.0.2": "patch:expo-av@npm%3A13.0.2#./.yarn/patches/expo-av-npm-13.0.2-7a651776f1.patch",
"react-native-share-menu@^6.0.0": "patch:react-native-share-menu@npm%3A6.0.0#./.yarn/patches/react-native-share-menu-npm-6.0.0-f1094c3204.patch",
"@types/react-native-share-menu@^5.0.2": "patch:@types/react-native-share-menu@npm%3A5.0.2#./.yarn/patches/@types-react-native-share-menu-npm-5.0.2-373df17ecc.patch",
"react-native-ios-context-menu@^1.15.1": "patch:react-native-ios-context-menu@npm%3A1.15.1#./.yarn/patches/react-native-ios-context-menu-npm-1.15.1-0034bfa5ba.patch",
"react-native-reanimated-zoom@^0.3.3": "patch:react-native-reanimated-zoom@npm%3A0.3.3#./.yarn/patches/react-native-reanimated-zoom-npm-0.3.3-bbb8d84109.patch",
"react-native@^0.72.0": "patch:react-native@npm%3A0.72.0#./.yarn/patches/react-native-npm-0.72.0-66f5fd62b3.patch",
"@mattermost/react-native-paste-input@^0.6.2": "patch:@mattermost/react-native-paste-input@npm%3A0.6.2#./.yarn/patches/@mattermost-react-native-paste-input-npm-0.6.2-e109419dfb.patch"
"react-native-ios-context-menu@^2.3.2": "patch:react-native-ios-context-menu@npm%3A2.3.2#~/.yarn/patches/react-native-ios-context-menu-npm-2.3.2-9099ed7858.patch",
"react-native-reanimated-zoom@^0.3.3": "patch:react-native-reanimated-zoom@npm%3A0.3.3#./.yarn/patches/react-native-reanimated-zoom-npm-0.3.3-bbb8d84109.patch"
}
}

View File

@ -1,5 +1,6 @@
import Icon, { IconName } from '@components/Icon'
import CustomText from '@components/Text'
import { useNavigation } from '@react-navigation/native'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
@ -9,7 +10,7 @@ export type Props = {
native?: boolean
background?: boolean
onPress: () => void
onPress?: () => void
} & ({ type?: undefined; content?: IconName } | { type: 'text'; content: string })
const HeaderLeft: React.FC<Props> = ({
@ -19,6 +20,7 @@ const HeaderLeft: React.FC<Props> = ({
background = false,
onPress
}) => {
const navigation = useNavigation()
const { colors } = useTheme()
const children = () => {
@ -40,7 +42,7 @@ const HeaderLeft: React.FC<Props> = ({
return (
<Pressable
onPress={onPress}
onPress={onPress ? onPress : () => navigation.goBack()}
children={children()}
style={{
flexDirection: 'row',

View File

@ -1,18 +1,18 @@
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import React from 'react'
import { Pressable, View } from 'react-native'
import haptics from './haptics'
import Icon from './Icon'
import { ParseEmojis } from './Parse'
import CustomText from './Text'
import haptics from './haptics'
export interface Props {
title?: string
multiple?: boolean
options: { selected: boolean; content: string }[]
setOptions: React.Dispatch<React.SetStateAction<{ selected: boolean; content: string }[]>>
setOptions: React.Dispatch<React.SetStateAction<any>>
disabled?: boolean
invalid?: boolean
}

View File

@ -6,7 +6,6 @@ import { ParseHTML } from '@components/Parse'
import RelativeTime from '@components/RelativeTime'
import CustomText from '@components/Text'
import { BlurView } from '@react-native-community/blur'
import { useAccessibility } from '@utils/accessibility/AccessibilityManager'
import { RootStackScreenProps } from '@utils/navigation/navigators'
import { useAnnouncementMutation, useAnnouncementQuery } from '@utils/queryHooks/announcement'
import { StyleConstants } from '@utils/styles/constants'
@ -30,7 +29,6 @@ const ScreenAnnouncements: React.FC<RootStackScreenProps<'Screen-Announcements'>
},
navigation
}) => {
const { reduceMotionEnabled } = useAccessibility()
const { colors, mode } = useTheme()
const [index, setIndex] = useState(0)
const { t } = useTranslation('screenAnnouncements')

View File

@ -1,4 +1,3 @@
import { HeaderLeft } from '@components/Header'
import Icon from '@components/Icon'
import { SwipeToActions } from '@components/SwipeToActions'
import CustomText from '@components/Text'
@ -7,10 +6,10 @@ import { connectMedia } from '@utils/api/helpers/connect'
import apiInstance from '@utils/api/instance'
import { ScreenComposeStackScreenProps } from '@utils/navigation/navigators'
import { getAccountStorage, setAccountStorage, useAccountStorage } from '@utils/storage/actions'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import { Image } from 'expo-image'
import React, { useContext, useEffect, useState } from 'react'
import React, { useContext, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Dimensions, Modal, Pressable, View } from 'react-native'
import ComposeContext from './utils/createContext'
@ -35,13 +34,6 @@ const ComposeDraftsList: React.FC<ScreenComposeStackScreenProps<'Screen-Compose-
const { colors } = useTheme()
const { t } = useTranslation('screenCompose')
useEffect(() => {
navigation.setOptions({
title: t('content.draftsList.header.title'),
headerLeft: () => <HeaderLeft content='chevron-down' onPress={() => navigation.goBack()} />
})
}, [])
const { composeDispatch } = useContext(ComposeContext)
const [drafts] = useAccountStorage.object('drafts')
const [checkingAttachments, setCheckingAttachments] = useState(false)

View File

@ -38,7 +38,6 @@ const ComposeEditAttachment: React.FC<
useEffect(() => {
navigation.setOptions({
title: t('screenCompose:content.editAttachment.header.title'),
headerLeft: () => (
<HeaderLeft
content='chevron-down'

View File

@ -414,12 +414,21 @@ const ScreenCompose: React.FC<RootStackScreenProps<'Screen-Compose'>> = ({
<Stack.Screen
name='Screen-Compose-DraftsList'
component={ComposeDraftsList}
options={{ presentation: 'modal', headerShadowVisible: false }}
options={{
presentation: 'modal',
headerShadowVisible: false,
title: t('screenCompose:content.draftsList.header.title'),
headerLeft: () => <HeaderLeft content='chevron-down' />
}}
/>
<Stack.Screen
name='Screen-Compose-EditAttachment'
component={ComposeEditAttachment}
options={{ presentation: 'modal', headerShadowVisible: false }}
options={{
presentation: 'modal',
headerShadowVisible: false,
title: t('screenCompose:content.editAttachment.header.title')
}}
/>
</Stack.Navigator>
</ComposeContext.Provider>

View File

@ -4,15 +4,19 @@ import usePopToTop from '@utils/navigation/usePopToTop'
import React from 'react'
import TabShared from '../Shared'
import Root from './Root'
import { HeaderLeft } from '@components/Header'
const Stack = createNativeStackNavigator<TabLocalStackParamList>()
const TabLocal: React.FC = () => {
usePopToTop('Tab-Local-Root')
return (
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
<Stack.Navigator
screenOptions={{ headerShadowVisible: false, headerLeft: () => <HeaderLeft /> }}
>
<Stack.Screen name='Tab-Local-Root' component={Root} />
{TabShared({ Stack })}
{TabShared(Stack)}
</Stack.Navigator>
)
}

View File

@ -51,7 +51,7 @@ const TabMePreferencesFilter: React.FC<
const titleState = useState(params.type === 'edit' ? params.filter.title : '')
const expirations = ['0', '1800', '3600', '43200', '86400', '604800', '18144000'] as const
const [expiration, setExpiration] = useState<typeof expirations[number]>('0')
const [expiration, setExpiration] = useState<(typeof expirations)[number]>('0')
const [contexts, setContexts] = useState<
{
@ -226,8 +226,10 @@ const TabMePreferencesFilter: React.FC<
cancelButtonIndex: expirations.length,
...androidActionSheetStyles(colors)
},
(selectedIndex: number) => {
selectedIndex < expirations.length && setExpiration(expirations[selectedIndex])
selectedIndex => {
selectedIndex &&
selectedIndex < expirations.length &&
setExpiration(expirations[selectedIndex])
}
)
}

View File

@ -12,7 +12,7 @@ import TabMeProfileRoot from './Root'
const Stack = createNativeStackNavigator<TabMeProfileStackParamList>()
const TabMeProfile: React.FC<TabMeStackScreenProps<'Tab-Me-Switch'>> = ({ navigation }) => {
const TabMeProfile: React.FC<TabMeStackScreenProps<'Tab-Me-Profile'>> = ({ navigation }) => {
const { t } = useTranslation('screenTabs')
const messageRef = useRef<FlashMessage>(null)

View File

@ -156,7 +156,7 @@ const TabMe: React.FC = () => {
})}
/>
{TabShared({ Stack })}
{TabShared(Stack)}
</Stack.Navigator>
)
}

View File

@ -54,7 +54,7 @@ const TabNotifications: React.FC = () => {
component={TabNotificationsFilters}
options={{ presentation: 'modal', gestureEnabled: false }}
/>
{TabShared({ Stack })}
{TabShared(Stack)}
</Stack.Navigator>
)
}

View File

@ -12,7 +12,7 @@ const TabPublic: React.FC = () => {
return (
<Stack.Navigator screenOptions={{ headerShadowVisible: false }}>
<Stack.Screen name='Tab-Public-Root' component={Root} />
{TabShared({ Stack })}
{TabShared(Stack)}
</Stack.Navigator>
)
}

View File

@ -1,17 +1,17 @@
import menuAccount from '@components/contextMenu/account'
import menuShare from '@components/contextMenu/share'
import { HeaderLeft, HeaderRight } from '@components/Header'
import { HeaderRight } from '@components/Header'
import Icon from '@components/Icon'
import CustomText from '@components/Text'
import Timeline from '@components/Timeline'
import menuAccount from '@components/contextMenu/account'
import menuShare from '@components/contextMenu/share'
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
import { queryClient } from '@utils/queryHooks'
import { useAccountQuery } from '@utils/queryHooks/account'
import { useRelationshipQuery } from '@utils/queryHooks/relationship'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { useAccountStorage } from '@utils/storage/actions'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import React, { Fragment, useEffect, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform, Pressable, Text, View } from 'react-native'
@ -65,8 +65,6 @@ const TabSharedAccount: React.FC<TabSharedStackScreenProps<'Tab-Shared-Account'>
navigation.setOptions({
headerTransparent: true,
headerStyle: { backgroundColor: `rgba(255, 255, 255, 0)` },
title: '',
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} background />,
headerRight: () => {
return (
<DropdownMenu.Root>

View File

@ -1,6 +1,5 @@
import Button from '@components/Button'
import haptics from '@components/haptics'
import { HeaderRight } from '@components/Header'
import { MenuRow } from '@components/Menu'
import CustomText from '@components/Text'
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
@ -8,14 +7,13 @@ import { useAccountInListsQuery } from '@utils/queryHooks/account'
import { useListAccountsMutation, useListsQuery } from '@utils/queryHooks/lists'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { SectionList, View } from 'react-native'
const TabSharedAccountInLists: React.FC<
TabSharedStackScreenProps<'Tab-Shared-Account-In-Lists'>
> = ({
navigation,
route: {
params: { account }
}
@ -23,20 +21,6 @@ const TabSharedAccountInLists: React.FC<
const { colors } = useTheme()
const { t } = useTranslation(['common', 'screenTabs'])
useEffect(() => {
navigation.setOptions({
presentation: 'modal',
title: t('screenTabs:shared.accountInLists.name', { username: account.username }),
headerRight: () => (
<HeaderRight
type='text'
content={t('common:buttons.done')}
onPress={() => navigation.pop(1)}
/>
)
})
}, [])
const listsQuery = useListsQuery()
const accountInListsQuery = useAccountInListsQuery({ id: account.id })

View File

@ -1,12 +1,7 @@
import { HeaderLeft } from '@components/Header'
import { ParseEmojis } from '@components/Parse'
import CustomText from '@components/Text'
import Timeline from '@components/Timeline'
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
import { QueryKeyTimeline } from '@utils/queryHooks/timeline'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect } from 'react'
import { Trans } from 'react-i18next'
const TabSharedAttachments: React.FC<TabSharedStackScreenProps<'Tab-Shared-Attachments'>> = ({
navigation,
@ -14,33 +9,7 @@ const TabSharedAttachments: React.FC<TabSharedStackScreenProps<'Tab-Shared-Attac
params: { account }
}
}) => {
const { colors } = useTheme()
useEffect(() => {
navigation.setOptions({
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} background />,
headerTitle: () => (
<CustomText numberOfLines={1}>
<Trans
ns='screenTabs'
i18nKey='shared.attachments.name'
components={[
<ParseEmojis
content={account.display_name || account.username}
emojis={account.emojis}
fontBold
/>,
<CustomText
fontStyle='M'
style={{ color: colors.primaryDefault }}
fontWeight='Bold'
/>
]}
/>
</CustomText>
),
headerBackVisible: false
})
navigation.setParams({ queryKey })
}, [])

View File

@ -1,6 +1,5 @@
import Button from '@components/Button'
import { Filter } from '@components/Filter'
import { HeaderRight } from '@components/Header'
import Hr from '@components/Hr'
import CustomText from '@components/Text'
import { featureCheck } from '@utils/helpers/featureCheck'
@ -8,7 +7,7 @@ import { TabSharedStackScreenProps, useNavState } from '@utils/navigation/naviga
import { useFilterMutation, useFiltersQuery } from '@utils/queryHooks/filters'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { SectionList, View } from 'react-native'
@ -24,19 +23,6 @@ const TabSharedFilter: React.FC<TabSharedStackScreenProps<'Tab-Shared-Filter'>>
const { colors } = useTheme()
const { t } = useTranslation(['common', 'screenTabs'])
useEffect(() => {
navigation.setOptions({
title: t('screenTabs:shared.filter.name'),
headerRight: () => (
<HeaderRight
type='text'
content={t('common:buttons.done')}
onPress={() => navigation.goBack()}
/>
)
})
}, [])
const { data, isFetching, refetch } = useFiltersQuery<'v2'>({ version: 'v2' })
const sections = [
{

View File

@ -1,5 +1,5 @@
import menuHashtag from '@components/contextMenu/hashtag'
import { HeaderLeft, HeaderRight } from '@components/Header'
import { HeaderRight } from '@components/Header'
import Timeline from '@components/Timeline'
import { featureCheck } from '@utils/helpers/featureCheck'
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
@ -20,10 +20,6 @@ const TabSharedHashtag: React.FC<TabSharedStackScreenProps<'Tab-Shared-Hashtag'>
const mHashtag = menuHashtag({ tag_name, queryKey })
useEffect(() => {
navigation.setOptions({
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />,
title: `#${decodeURIComponent(tag_name)}`
})
navigation.setParams({ queryKey: queryKey })
}, [])

View File

@ -1,4 +1,3 @@
import { HeaderLeft } from '@components/Header'
import Icon from '@components/Icon'
import { ParseEmojis } from '@components/Parse'
import ComponentSeparator from '@components/Separator'
@ -12,8 +11,7 @@ import { useStatusHistory } from '@utils/queryHooks/statusesHistory'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { diffChars, diffWords } from 'diff'
import React, { useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import React from 'react'
import { FlatList, View } from 'react-native'
const SCRIPTS_WITHOUT_BOUNDARIES = [
@ -136,21 +134,12 @@ const ContentView: React.FC<{
}
const TabSharedHistory: React.FC<TabSharedStackScreenProps<'Tab-Shared-History'>> = ({
navigation,
route: {
params: { status, detectedLanguage }
}
}) => {
const { t } = useTranslation('screenTabs')
const { data } = useStatusHistory({ status })
useEffect(() => {
navigation.setOptions({
title: t('shared.history.name'),
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />
})
}, [])
const dataReversed = data ? [...data].reverse() : []
const withoutBoundary = !!SCRIPTS_WITHOUT_BOUNDARIES.filter(script =>

View File

@ -13,7 +13,7 @@ import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Pressable, View } from 'react-native'
const TabSharedMute: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>> = ({
const TabSharedMute: React.FC<TabSharedStackScreenProps<'Tab-Shared-Mute'>> = ({
navigation,
route: {
params: { account }
@ -47,14 +47,6 @@ const TabSharedMute: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>> =
useEffect(() => {
navigation.setOptions({
title: t('screenTabs:shared.mute.name', { acct: `@${account.acct}` }),
headerLeft: () => (
<HeaderLeft
type='text'
content={t('common:buttons.cancel')}
onPress={() => navigation.goBack()}
/>
),
headerRight: () => (
<HeaderRight
type='text'

View File

@ -1,5 +1,5 @@
import ComponentAccount from '@components/Account'
import { HeaderLeft, HeaderRight } from '@components/Header'
import { HeaderRight } from '@components/Header'
import { ModalScrollView } from '@components/ModalScrollView'
import Selections from '@components/Selections'
import CustomText from '@components/Text'
@ -38,14 +38,6 @@ const TabSharedReport: React.FC<TabSharedStackScreenProps<'Tab-Shared-Report'>>
const [isReporting, setIsReporting] = useState(false)
useEffect(() => {
navigation.setOptions({
title: t('screenTabs:shared.report.name', { acct: `@${account.acct}` }),
headerLeft: () => (
<HeaderLeft
type='text'
content={t('common:buttons.cancel')}
onPress={() => navigation.goBack()}
/>
),
headerRight: () => (
<HeaderRight
type='text'

View File

@ -1,13 +1,12 @@
import ComponentAccount from '@components/Account'
import ComponentHashtag from '@components/Hashtag'
import { HeaderLeft } from '@components/Header'
import ComponentSeparator from '@components/Separator'
import CustomText from '@components/Text'
import TimelineDefault from '@components/Timeline/Default'
import { TabSharedStackScreenProps } from '@utils/navigation/navigators'
import { useSearchQuery } from '@utils/queryHooks/search'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import { StyleConstants } from '@utils/styles/constants'
import { debounce } from 'lodash'
import React, { useEffect, useRef, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
@ -24,7 +23,6 @@ const TabSharedSearch: React.FC<TabSharedStackScreenProps<'Tab-Shared-Search'>>
const [searchTerm, setSearchTerm] = useState<string>('')
useEffect(() => {
navigation.setOptions({
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />,
headerTitle: () => {
return (
<View
@ -73,8 +71,7 @@ const TabSharedSearch: React.FC<TabSharedStackScreenProps<'Tab-Shared-Search'>>
/>
</View>
)
},
headerBackVisible: false
}
})
}, [mode])
useEffect(() => {

View File

@ -1,8 +1,6 @@
import { HeaderLeft } from '@components/Header'
import Icon from '@components/Icon'
import { HeaderRight } from '@components/Header'
import { Loading } from '@components/Loading'
import ComponentSeparator from '@components/Separator'
import CustomText from '@components/Text'
import TimelineDefault from '@components/Timeline/Default'
import { useQuery } from '@tanstack/react-query'
import apiGeneral from '@utils/api/general'
@ -17,7 +15,7 @@ import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Alert, FlatList, Platform, Pressable, View } from 'react-native'
import { Alert, FlatList, Platform, View } from 'react-native'
import { Path, Svg } from 'react-native-svg'
const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
@ -38,38 +36,20 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
const flRef = useRef<FlatList<Mastodon.Status & { _level?: number }>>(null)
useEffect(() => {
navigation.setOptions({
headerTitle: () => (
<Pressable
style={{ flexDirection: 'row', alignItems: 'center' }}
disabled={!hasRemoteContent}
onPress={() =>
Alert.alert(
t('screenTabs:shared.toot.remoteFetch.title'),
t('screenTabs:shared.toot.remoteFetch.message')
)
}
>
{hasRemoteContent ? (
<Icon
name='wifi'
size={StyleConstants.Font.Size.M}
color={colors.primaryDefault}
style={{ marginRight: StyleConstants.Spacing.S }}
/>
) : null}
<CustomText
style={{ color: colors.primaryDefault }}
fontSize='L'
fontWeight='Bold'
numberOfLines={1}
children={t('screenTabs:shared.toot.name')}
hasRemoteContent &&
navigation.setOptions({
headerRight: () => (
<HeaderRight
content='wifi'
onPress={() =>
Alert.alert(
t('screenTabs:shared.toot.remoteFetch.title'),
t('screenTabs:shared.toot.remoteFetch.message')
)
}
/>
</Pressable>
),
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />,
headerBackVisible: false
})
)
})
navigation.setParams({ queryKey: queryKey.local })
}, [hasRemoteContent])

View File

@ -1,5 +1,4 @@
import ComponentAccount from '@components/Account'
import { HeaderLeft } from '@components/Header'
import Icon from '@components/Icon'
import { Loading } from '@components/Loading'
import ComponentSeparator from '@components/Separator'
@ -9,7 +8,7 @@ import { QueryKeyUsers, useUsersQuery } from '@utils/queryHooks/users'
import { flattenPages } from '@utils/queryHooks/utils'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useEffect } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { View } from 'react-native'
import { FlatList } from 'react-native-gesture-handler'
@ -20,14 +19,6 @@ const TabSharedUsers: React.FC<TabSharedStackScreenProps<'Tab-Shared-Users'>> =
}) => {
const { colors } = useTheme()
const { t } = useTranslation('screenTabs')
useEffect(() => {
navigation.setOptions({
title: t(`shared.users.${params.reference}.${params.type}`, {
count: params.count
} as any) as any,
headerLeft: () => <HeaderLeft onPress={() => navigation.goBack()} />
})
}, [])
const queryKey: QueryKeyUsers = ['Users', params]
const { data, isFetching, hasNextPage, fetchNextPage, isFetchingNextPage } = useUsersQuery({

View File

@ -1,3 +1,5 @@
import { HeaderLeft, HeaderRight } from '@components/Header'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import TabSharedAccount from '@screens/Tabs/Shared/Account'
import TabSharedAccountInLists from '@screens/Tabs/Shared/AccountInLists'
import TabSharedAttachments from '@screens/Tabs/Shared/Attachments'
@ -8,58 +10,166 @@ import TabSharedSearch from '@screens/Tabs/Shared/Search'
import TabSharedToot from '@screens/Tabs/Shared/Toot'
import TabSharedUsers from '@screens/Tabs/Shared/Users'
import React from 'react'
import { Trans, useTranslation } from 'react-i18next'
import TabSharedFilter from './Filter'
import TabSharedMute from './Mute'
import {
TabLocalStackParamList,
TabMeStackParamList,
TabNotificationsStackParamList,
TabPublicStackParamList
} from '@utils/navigation/navigators'
import CustomText from '@components/Text'
import { ParseEmojis } from '@components/Parse'
import { useTheme } from '@utils/styles/ThemeManager'
const TabShared = (
Stack: ReturnType<
typeof createNativeStackNavigator<
| TabLocalStackParamList
| TabPublicStackParamList
| TabNotificationsStackParamList
| TabMeStackParamList
>
>
) => {
const { colors } = useTheme()
const { t } = useTranslation(['common', 'screenTabs'])
const TabShared = ({ Stack }: { Stack: any }) => {
return (
<Stack.Group>
<Stack.Screen
key='Tab-Shared-Account'
name='Tab-Shared-Account'
component={TabSharedAccount}
options={{
title: '',
headerLeft: () => <HeaderLeft background />
}}
/>
<Stack.Screen
key='Tab-Shared-Account-In-Lists'
name='Tab-Shared-Account-In-Lists'
component={TabSharedAccountInLists}
options={({
navigation,
route: {
params: {
account: { username }
}
}
}) => ({
presentation: 'modal',
title: t('screenTabs:shared.accountInLists.name', { username: username }),
headerRight: () => (
<HeaderRight
type='text'
content={t('common:buttons.done')}
onPress={() => navigation.pop(1)}
/>
)
})}
/>
<Stack.Screen
key='Tab-Shared-Attachments'
name='Tab-Shared-Attachments'
component={TabSharedAttachments}
options={({
route: {
params: { account }
}
}) => ({
headerTitle: () => (
<CustomText numberOfLines={1}>
<Trans
ns='screenTabs'
i18nKey='shared.attachments.name'
components={[
<ParseEmojis
content={account.display_name || account.username}
emojis={account.emojis}
fontBold
/>,
<CustomText
fontStyle='M'
style={{ color: colors.primaryDefault }}
fontWeight='Bold'
/>
]}
/>
</CustomText>
)
})}
/>
<Stack.Screen
key='Tab-Shared-Filter'
name='Tab-Shared-Filter'
component={TabSharedFilter}
options={{ presentation: 'modal' }}
options={({ navigation }) => ({
presentation: 'modal',
title: t('screenTabs:shared.filter.name'),
headerRight: () => (
<HeaderRight
type='text'
content={t('common:buttons.done')}
onPress={() => navigation.goBack()}
/>
)
})}
/>
<Stack.Screen
key='Tab-Shared-Hashtag'
name='Tab-Shared-Hashtag'
component={TabSharedHashtag}
options={({
route: {
params: { tag_name }
}
}) => ({ title: `#${decodeURIComponent(tag_name)}` })}
/>
<Stack.Screen
key='Tab-Shared-History'
name='Tab-Shared-History'
component={TabSharedHistory}
options={{ title: t('screenTabs:shared.history.name') }}
/>
<Stack.Screen
key='Tab-Shared-Mute'
name='Tab-Shared-Mute'
component={TabSharedMute}
options={{ presentation: 'modal' }}
options={({
route: {
params: {
account: { acct }
}
}
}) => ({
presentation: 'modal',
headerLeft: () => <HeaderLeft type='text' content={t('common:buttons.cancel')} />,
title: t('screenTabs:shared.mute.name', { acct: `@${acct}` })
})}
/>
<Stack.Screen
key='Tab-Shared-Report'
name='Tab-Shared-Report'
component={TabSharedReport}
options={{ presentation: 'modal' }}
options={({
route: {
params: { account }
}
}) => ({
presentation: 'modal',
headerLeft: () => <HeaderLeft type='text' content={t('common:buttons.cancel')} />,
title: t('screenTabs:shared.report.name', { acct: `@${account.acct}` })
})}
/>
<Stack.Screen key='Tab-Shared-Search' name='Tab-Shared-Search' component={TabSharedSearch} />
<Stack.Screen key='Tab-Shared-Toot' name='Tab-Shared-Toot' component={TabSharedToot} />
<Stack.Screen key='Tab-Shared-Users' name='Tab-Shared-Users' component={TabSharedUsers} />
<Stack.Screen
name='Tab-Shared-Toot'
component={TabSharedToot}
options={{ title: t('screenTabs:shared.toot.name') }}
/>
<Stack.Screen
name='Tab-Shared-Users'
component={TabSharedUsers}
options={({ route: { params } }) => ({
title: t(`shared.users.${params.reference}.${params.type}`, {
count: params.count
} as any) as any
})}
/>
</Stack.Group>
)
}

View File

@ -1,29 +1,7 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "React Native",
"_version": "2.0.3",
"extends": "@react-native/typescript-config/tsconfig.json",
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"types": [
"react-native"
],
"lib": [
"esnext"
],
"allowJs": false,
"jsx": "react-native",
"noEmit": true,
"isolatedModules": true,
"strict": true,
"strictFunctionTypes": false,
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"traceResolution": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"skipLibCheck": true,
"baseUrl": "./",
"paths": {
"@components/*": [
@ -39,10 +17,5 @@
"./src/utils/*"
]
}
},
"exclude": [
"node_modules",
"babel.config.js",
"metro.config.js"
]
}
}

6955
yarn.lock

File diff suppressed because it is too large Load Diff