Skip to content

Commit

Permalink
Merge pull request #545 from Psychedelic/0.4.0-rebased
Browse files Browse the repository at this point in the history
0.4.0
  • Loading branch information
ignaciosantise authored Nov 29, 2022
2 parents 5cf1e0c + b83cf52 commit c82d172
Show file tree
Hide file tree
Showing 170 changed files with 3,865 additions and 2,329 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
applicationId "co.psychedelic.plug"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 24
versionName "0.3.0"
versionCode 27
versionName "0.4.0"
resValue "string", "build_config_package", "co.psychedelic.plug"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS"/>

<application
android:name=".MainApplication"
Expand Down
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ allprojects {

google()
maven { url 'https://www.jitpack.io' }
jcenter()
}
}
1 change: 1 addition & 0 deletions declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ declare module '*.svg' {
declare module 'react-native-fetch-api';
declare module 'react-native-crypto-js';
declare module 'emoji-datasource';
declare module 'mime-types';
4 changes: 2 additions & 2 deletions ios/Plug.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
"$(inherited)",
"$(PROJECT_DIR)/rust/.cargo/mobile_app/target/universal/release",
);
MARKETING_VERSION = 0.3.0;
MARKETING_VERSION = 0.4.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -603,7 +603,7 @@
"$(inherited)",
"$(PROJECT_DIR)/rust/.cargo/mobile_app/target/universal/release",
);
MARKETING_VERSION = 0.3.0;
MARKETING_VERSION = 0.4.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
24 changes: 12 additions & 12 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -427,27 +427,27 @@ PODS:
- React-Core
- RNCAsyncStorage (1.17.10):
- React-Core
- RNCClipboard (1.5.1):
- RNCClipboard (1.11.1):
- React-Core
- RNCMaskedView (0.2.7):
- React-Core
- RNDeviceInfo (10.2.0):
- RNDeviceInfo (10.3.0):
- React-Core
- RNFastImage (8.6.1):
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFileViewer (2.1.5):
- React-Core
- RNFlashList (1.2.2):
- RNFlashList (1.4.0):
- React-Core
- RNGestureHandler (2.7.1):
- React-Core
- RNLocalize (2.2.3):
- React-Core
- RNReactNativeHapticFeedback (1.14.0):
- React-Core
- RNReanimated (2.10.0):
- RNReanimated (2.12.0):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand Down Expand Up @@ -480,7 +480,7 @@ PODS:
- RNSentry (4.5.0):
- React-Core
- Sentry (= 7.25.1)
- RNSVG (13.4.0):
- RNSVG (13.5.0):
- React-Core
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
Expand Down Expand Up @@ -572,7 +572,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- RNBootSplash (from `../node_modules/react-native-bootsplash`)
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNFastImage (from `../node_modules/react-native-fast-image`)
Expand Down Expand Up @@ -713,7 +713,7 @@ EXTERNAL SOURCES:
RNCAsyncStorage:
:path: "../node_modules/@react-native-async-storage/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-community/clipboard"
:path: "../node_modules/@react-native-clipboard/clipboard"
RNCMaskedView:
:path: "../node_modules/@react-native-masked-view/masked-view"
RNDeviceInfo:
Expand Down Expand Up @@ -816,19 +816,19 @@ SPEC CHECKSUMS:
ReactCommon: 01064177e66d652192c661de899b1076da962fd9
RNBootSplash: 5f346163977573d6b2aeba1b25df9d2245c0d73c
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd
RNCMaskedView: cb9670ea9239998340eaab21df13fa12a1f9de15
RNDeviceInfo: 8b83e99e290deaf1bab71673cc636776ef647b6f
RNDeviceInfo: 4701f0bf2a06b34654745053db0ce4cb0c53ada7
RNFastImage: 3207b9eb17c2425d574ca40db35185db6e324f4e
RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592
RNFlashList: 13d14d9502661134ad3ba892f81d76bdcbd79755
RNFlashList: 399bf6a0db68f594ad2c86aaff3ea39564f39f8a
RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122
RNLocalize: a64514b46a01375fdfae9349036b4dc7130333b5
RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c
RNReanimated: 60e291d42c77752a0f6d6f358387bdf225a87c6e
RNReanimated: 2a91e85fcd343f8af3c58d3425b99fdd285590a5
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d
RNSentry: a034d0e81e3d3c04b770dd2df953fe634d372d22
RNSVG: 07dbd870b0dcdecc99b3a202fa37c8ca163caec2
RNSVG: 38ca962c970dbce1ca38991a5aebf26d163f9efb
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
Sentry: dd29c18c32b0af9269949f079cf631d581ca76ca
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"android:bundle.prod": "yarn run ic:build.android && yarn run patch:android && cd android && ./gradlew clean && ./gradlew bundleProductionRelease",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"lint": "eslint . --max-warnings=0",
"nodeify": "rn-nodeify --hack --install crypto,buffer,react-native-randombytes,process,stream",
"lint-fix": "eslint . --fix",
"removeDeps": "rm -rf yarn.lock node_modules && cd ios && rm -rf Pods Podfile.lock && cd ..",
Expand All @@ -33,20 +33,20 @@
"@dfinity/candid": "0.9.3",
"@dfinity/principal": "^0.9.3",
"@hookform/error-message": "^2.0.0",
"@psychedelic/dab-js": "1.4.12",
"@psychedelic/plug-controller": "0.24.5",
"@psychedelic/dab-js": "^1.6.0-alpha.2",
"@psychedelic/plug-controller": "0.25.3",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-clipboard/clipboard": "^1.11.1",
"@react-native-community/blur": "^4.2.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-masked-view/masked-view": "^0.2.7",
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/elements": "^1.3.6",
"@react-navigation/material-top-tabs": "^6.2.4",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "^6.2.0",
"@react-navigation/material-top-tabs": "^6.3.0",
"@react-navigation/native": "^6.0.13",
"@react-navigation/stack": "^6.3.4",
"@reduxjs/toolkit": "^1.8.6",
"@sentry/react-native": "^4.5.0",
"@shopify/flash-list": "^1.2.2",
"@shopify/flash-list": "^1.4.0",
"@walletconnect/client": "^1.7.5",
"assert-browserify": "^2.0.0",
"axios": "0.24.0",
Expand All @@ -61,6 +61,7 @@
"i18next": "^21.8.0",
"js-sha256": "^0.9.0",
"json-bigint": "^1.0.0",
"mime-types": "^2.1.35",
"patch-package": "^6.4.7",
"process": "^0.11.10",
"punycode": "^2.1.1",
Expand All @@ -74,7 +75,7 @@
"react-native-config": "^1.4.6",
"react-native-crypto": "^2.2.0",
"react-native-crypto-js": "^1.0.0",
"react-native-device-info": "^10.2.0",
"react-native-device-info": "^10.3.0",
"react-native-document-picker": "^8.1.1",
"react-native-fast-image": "^8.6.1",
"react-native-fetch-api": "^2.0.0",
Expand All @@ -90,11 +91,11 @@
"react-native-portalize": "^1.0.7",
"react-native-process-shim": "^1.1.1",
"react-native-randombytes": "^3.6.1",
"react-native-reanimated": "^2.10.0",
"react-native-reanimated": "^2.12.0",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.14.1",
"react-native-sensitive-info": "^6.0.0-alpha.9",
"react-native-svg": "^13.4.0",
"react-native-svg": "^13.5.0",
"react-native-tab-view": "^3.1.1",
"react-native-toast-notifications": "^3.3.1",
"react-native-url-polyfill": "^1.3.0",
Expand All @@ -118,7 +119,7 @@
"devDependencies": {
"@babel/core": "^7.18.5",
"@babel/runtime": "7.18.3",
"@react-native-community/eslint-config": "^2.0.0",
"@react-native-community/eslint-config": "^3.1.0",
"@rnx-kit/dep-check": "^1.13.1",
"@types/jest": "^27.5.1",
"@types/react-native": "0.66.3",
Expand All @@ -128,9 +129,11 @@
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-exponentiation-operator": "^6.24.1",
"eslint": "^7.32.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-simple-import-sort": "^7.0.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.72.1",
"prettier": "^2.7.1",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "18.1.0",
"typescript": "4.6.4"
Expand Down
18 changes: 18 additions & 0 deletions patches/mime-types+2.1.35.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js
index b9f34d5..68ccbe9 100644
--- a/node_modules/mime-types/index.js
+++ b/node_modules/mime-types/index.js
@@ -13,7 +13,12 @@
*/

var db = require('mime-db')
-var extname = require('path').extname
+
+const extname = (path) => {
+ if (!path || path.indexOf('.') === -1) { return '' }
+ path = '.' + path.split('.').pop().toLowerCase()
+ return /.*(\..*)/g.exec(path)[1] || ''
+}

/**
* Module variables.
15 changes: 15 additions & 0 deletions patches/react-native+0.70.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
index 6a343d8..474b2ec 100644
--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
+++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js
@@ -111,6 +111,10 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
this._initialFrameHeight = this._frame.height;
}

+ if (this.props.onLayout) {
+ event.persist();
+ }
+
if (wasFrameNull) {
await this._updateBottomIfNecessary();
}
3 changes: 1 addition & 2 deletions src/components/buttons/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ const Button = ({
disableAnimation = false,
loading = false,
iconProps,
...props
}: Props) => {
return (
<Touchable
scale={animationScales.medium}
disabled={disabled || disableAnimation}
onPress={onPress}
onLongPress={onLongPress || onPress}>
<View style={[styles.button, buttonStyle]} {...props}>
<View style={[styles.button, buttonStyle]}>
{loading ? (
<ActivityIndicator style={StyleSheet.absoluteFill} color="white" />
) : (
Expand Down
5 changes: 1 addition & 4 deletions src/components/buttons/RainbowButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const RainbowButton = ({
disabled,
onLongPress,
loading = false,
...props
}: Props) => {
const disabledOrLoading = disabled || loading;
return (
Expand All @@ -36,8 +35,7 @@ const RainbowButton = ({
disabled={disabledOrLoading}>
<LinearGradient
style={[styles.button, buttonStyle]}
{...(disabledOrLoading ? DisabledRainbow : Rainbow)}
{...props}>
{...(disabledOrLoading ? DisabledRainbow : Rainbow)}>
<Button
onPress={onPress}
buttonStyle={[styles.buttonRainbow]}
Expand All @@ -46,7 +44,6 @@ const RainbowButton = ({
disabled={disabledOrLoading}
loading={loading}
disableAnimation
{...props}
/>
</LinearGradient>
</Touchable>
Expand Down
19 changes: 19 additions & 0 deletions src/components/buttons/ScrollableButton/hooks/useScrollHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useState } from 'react';
import { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';

function useScrollHanlder() {
const [scrollPosition, setScrollPosition] = useState(0);

const handleOnScroll = (
scrollEvent: NativeSyntheticEvent<NativeScrollEvent>
) => {
setScrollPosition(scrollEvent?.nativeEvent?.contentOffset.y);
};

return {
scrollPosition,
handleOnScroll,
};
}

export default useScrollHanlder;
Loading

0 comments on commit c82d172

Please sign in to comment.