diff --git a/.re-natal b/.re-natal index bcad9e346e..34d5a84205 100644 --- a/.re-natal +++ b/.re-natal @@ -36,7 +36,6 @@ "eccjs", "chance", "react-native-swiper", - "react-native-share", "react-native-emoji-picker", "react-native-autolink", "instabug-reactnative", diff --git a/android/app/build.gradle b/android/app/build.gradle index c340bbbb85..13d3259bf9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -181,7 +181,6 @@ dependencies { compile project(':react-native-fs') compile project(':react-native-image-crop-picker') compile project(':react-native-webview-bridge') - compile project(':react-native-share') compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"]) } diff --git a/android/app/src/main/java/im/status/ethereum/MainApplication.java b/android/app/src/main/java/im/status/ethereum/MainApplication.java index a48510d4d2..eddbf0f6ff 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -27,7 +27,6 @@ import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; import fr.bamlab.rnimageresizer.ImageResizerPackage; import com.reactnative.ivpusic.imagepicker.PickerPackage; import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage; -import cl.json.RNSharePackage; import java.util.Arrays; import java.util.List; @@ -36,7 +35,7 @@ public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override - protected boolean getUseDeveloperSupport() { + public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @@ -63,8 +62,7 @@ public class MainApplication extends Application implements ReactApplication { new ReactNativeDialogsPackage(), new ImageResizerPackage(), new PickerPackage(), - new WebViewBridgePackage(), - new RNSharePackage() + new WebViewBridgePackage() ); } }; diff --git a/android/settings.gradle b/android/settings.gradle index 56093144a2..07b3f95a82 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -42,7 +42,4 @@ include ':react-native-image-crop-picker' project(':react-native-image-crop-picker').projectDir = new File(settingsDir, '../node_modules/react-native-image-crop-picker/android') include ':react-native-webview-bridge' -project(':react-native-webview-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-bridge/android') - -include ':react-native-share' -project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android') \ No newline at end of file +project(':react-native-webview-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-bridge/android') \ No newline at end of file diff --git a/ios/StatusIm.xcodeproj/project.pbxproj b/ios/StatusIm.xcodeproj/project.pbxproj index bf5778f75e..84f8b6096f 100644 --- a/ios/StatusIm.xcodeproj/project.pbxproj +++ b/ios/StatusIm.xcodeproj/project.pbxproj @@ -51,7 +51,6 @@ 9ED2F45F1D9D535A00B36508 /* SF-UI-Text-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9ED2F45C1D9D52C100B36508 /* SF-UI-Text-Medium.otf */; }; 9ED2F4611D9D579900B36508 /* SF-UI-Text-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9ED2F4601D9D577B00B36508 /* SF-UI-Text-Bold.otf */; }; 9EE89E271E03FCB7007D3C25 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7F21DE718EF00D694FF /* libSplashScreen.a */; }; - 9EE89E291E03FD3D007D3C25 /* libRNShare.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7FA1DE7190C00D694FF /* libRNShare.a */; }; 9EE89E2D1E03FD9F007D3C25 /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20A5C9531D927137002C4965 /* libimageCropPicker.a */; }; A6AF670051B842249D520C7B /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7ED174A34D7D42358313368B /* Foundation.ttf */; }; AD5063BC2B2A4C52ACE0A0B4 /* libUdpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A96279092BEC4C4B93914F48 /* libUdpSockets.a */; }; @@ -326,13 +325,6 @@ remoteGlobalIDString = 3D7682761D8E76B80014119E; remoteInfo = SplashScreen; }; - B24FC7F91DE7190C00D694FF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RNShare; - }; B2A5F4371DEC36B200174F4D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = B2A5F42F1DEC36B200174F4D /* RCTAnimation.xcodeproj */; @@ -347,6 +339,48 @@ remoteGlobalIDString = 2D2A28201D9B03D100D4039D; remoteInfo = "RCTAnimation-tvOS"; }; + B2BC5D881EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C059A1DE3340900C268FA; + remoteInfo = yoga; + }; + B2BC5D8A1EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C06751DE3340C00C268FA; + remoteInfo = "yoga-tvOS"; + }; + B2BC5D8C1EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; + remoteInfo = cxxreact; + }; + B2BC5D8E1EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; + remoteInfo = "cxxreact-tvOS"; + }; + B2BC5D901EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; + remoteInfo = jschelpers; + }; + B2BC5D921EADD18B00A140D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; + remoteInfo = "jschelpers-tvOS"; + }; B2D090C71E6839D7005BD157 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = F93B6663A59F4B26BD4DA525 /* RNNetworkInfo.xcodeproj */; @@ -455,7 +489,6 @@ A96279092BEC4C4B93914F48 /* libUdpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libUdpSockets.a; sourceTree = ""; }; ACA66A8F16CD2FE21F38738B /* Pods-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.debug.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.debug.xcconfig"; sourceTree = ""; }; B23B48FE1E76917B006D4535 /* RobotoMono-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "RobotoMono-Medium.ttf"; sourceTree = ""; }; - B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNShare.xcodeproj; path = "../node_modules/react-native-share/ios/RNShare.xcodeproj"; sourceTree = ""; }; B24FC7FC1DE7195700D694FF /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; B24FC7FE1DE7195F00D694FF /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; B2A5F42F1DEC36B200174F4D /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; @@ -493,7 +526,6 @@ B2A5F45C1DEC36BB00174F4D /* libRCTAnimation.a in Frameworks */, B24FC7FF1DE7195F00D694FF /* MessageUI.framework in Frameworks */, B24FC7FD1DE7195700D694FF /* Social.framework in Frameworks */, - 9EE89E291E03FD3D007D3C25 /* libRNShare.a in Frameworks */, 9EE89E2D1E03FD9F007D3C25 /* libimageCropPicker.a in Frameworks */, 9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */, 20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */, @@ -627,7 +659,13 @@ isa = PBXGroup; children = ( 146834041AC3E56700842450 /* libReact.a */, - 9E3F1C0B1DDAE781005E4779 /* libReact-tvOS.a */, + 9E3F1C0B1DDAE781005E4779 /* libReact.a */, + B2BC5D891EADD18B00A140D0 /* libyoga.a */, + B2BC5D8B1EADD18B00A140D0 /* libyoga.a */, + B2BC5D8D1EADD18B00A140D0 /* libcxxreact.a */, + B2BC5D8F1EADD18B00A140D0 /* libcxxreact.a */, + B2BC5D911EADD18B00A140D0 /* libjschelpers.a */, + B2BC5D931EADD18B00A140D0 /* libjschelpers.a */, ); name = Products; sourceTree = ""; @@ -796,7 +834,6 @@ B2DEA0A41E49E32000FA28D6 /* RCTHttpServer.xcodeproj */, 9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */, B2A5F42F1DEC36B200174F4D /* RCTAnimation.xcodeproj */, - B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */, 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */, 20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */, 9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */, @@ -912,14 +949,6 @@ name = Products; sourceTree = ""; }; - B24FC7F61DE7190C00D694FF /* Products */ = { - isa = PBXGroup; - children = ( - B24FC7FA1DE7190C00D694FF /* libRNShare.a */, - ); - name = Products; - sourceTree = ""; - }; B2A5F4301DEC36B200174F4D /* Products */ = { isa = PBXGroup; children = ( @@ -989,7 +1018,7 @@ 20B6B6891D92C42700CC5C6A /* Embed Frameworks */, 9E71BA90038083A3D24E18E9 /* [CP] Embed Pods Frameworks */, E883D1F9B22B8292CC879292 /* [CP] Copy Pods Resources */, - E3914A731DF919ED00EBB515 /* ShellScript */, + E3914A731DF919ED00EBB515 /* Run Script */, ); buildRules = ( ); @@ -1140,10 +1169,6 @@ ProductGroup = 20B7D0F01D3F74CC00B70F14 /* Products */; ProjectRef = 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */; }, - { - ProductGroup = B24FC7F61DE7190C00D694FF /* Products */; - ProjectRef = B24FC7F51DE7190C00D694FF /* RNShare.xcodeproj */; - }, { ProductGroup = 20B7D0FF1D3F74CD00B70F14 /* Products */; ProjectRef = 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */; @@ -1387,10 +1412,10 @@ remoteRef = 9E3F1C051DDAE781005E4779 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 9E3F1C0B1DDAE781005E4779 /* libReact-tvOS.a */ = { + 9E3F1C0B1DDAE781005E4779 /* libReact.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; - path = "libReact-tvOS.a"; + path = libReact.a; remoteRef = 9E3F1C0A1DDAE781005E4779 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1415,13 +1440,6 @@ remoteRef = B24FC7F11DE718EF00D694FF /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - B24FC7FA1DE7190C00D694FF /* libRNShare.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRNShare.a; - remoteRef = B24FC7F91DE7190C00D694FF /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; B2A5F4381DEC36B200174F4D /* libRCTAnimation.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1436,6 +1454,48 @@ remoteRef = B2A5F4391DEC36B200174F4D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + B2BC5D891EADD18B00A140D0 /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = B2BC5D881EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B2BC5D8B1EADD18B00A140D0 /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = B2BC5D8A1EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B2BC5D8D1EADD18B00A140D0 /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = B2BC5D8C1EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B2BC5D8F1EADD18B00A140D0 /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = B2BC5D8E1EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B2BC5D911EADD18B00A140D0 /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = B2BC5D901EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + B2BC5D931EADD18B00A140D0 /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = B2BC5D921EADD18B00A140D0 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; B2D090C81E6839D7005BD157 /* libRNNetworkInfo.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1585,13 +1645,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E3914A731DF919ED00EBB515 /* ShellScript */ = { + E3914A731DF919ED00EBB515 /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); + name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme b/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme index bca2f64833..62f223716c 100644 --- a/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme +++ b/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme @@ -3,9 +3,23 @@ LastUpgradeVersion = "0620" version = "1.3"> + + + + static bool isStatusInitialized; diff --git a/package.json b/package.json index d67c3adb00..8714502070 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "dependencies": { "assert": "^1.4.1", "awesome-phonenumber": "^1.0.13", - "babel-core": "6.20.0", - "babel-generator": "6.20.0", + "babel-core": "6.24.1", + "babel-generator": "6.24.1", "babel-helper-builder-react-jsx": "6.18.0", "babel-plugin-transform-es2015-block-scoping": "6.15.0", "babel-plugin-transform-es2015-parameters": "6.18.0", @@ -40,45 +40,45 @@ "process": "^0.11.5", "punycode": "^1.4.1", "querystring-es3": "^0.2.1", - "re-natal": "0.2.38", - "react": "^15.3.1", - "react-dom": "15.3.1", - "react-native": "^0.38.0", - "react-native-action-button": "2.0.13", + "re-natal": "^0.3.7", + "react": "^16.0.0-alpha.6", + "react-dom": "15.5.4", + "react-native": "^0.43.4", + "react-native-action-button": "^2.0.13", "react-native-android-sms-listener": "github:adrian-tiberius/react-native-android-sms-listener#listener-bugfix", "react-native-autolink": "^0.10.0", - "react-native-camera": "git+https://github.com/alwx/react-native-camera.git", + "react-native-camera": "^0.7.0", "react-native-circle-checkbox": "github:paramoshkinandrew/ReactNativeCircleCheckbox", "react-native-contacts": "^0.2.4", "react-native-crypto": "^2.0.1", "react-native-dialogs": "0.0.16", "react-native-drawer-layout": "1.1.3", "react-native-emoji-picker": "git+https://github.com/alwx/react-native-emoji-picker.git", - "react-native-fs": "^1.5.1", + "react-native-fs": "^2.1.0-rc.1", "react-native-http": "github:tradle/react-native-http#834492d", - "react-native-http-bridge": "^0.2.2", + "react-native-http-bridge": "^0.3.0", "react-native-i18n": "0.0.8", - "react-native-image-crop-picker": "^0.9.4", - "react-native-image-resizer": "github:danieldunderfelt/react-native-image-resizer", + "react-native-image-crop-picker": "^0.12.10", + "react-native-image-resizer": "^0.1.0", "react-native-invertible-scroll-view": "^1.0.0", "react-native-level-fs": "^2.0.1", - "react-native-linear-gradient": "1.5.7", + "react-native-linear-gradient": "2.0.0", "react-native-network-info": "github:alwx/react-native-network-info", "react-native-orientation": "github:youennPennarun/react-native-orientation", "react-native-popup-menu": "^0.7.1", "react-native-qrcode": "^0.2.2", "react-native-randombytes": "^2.1.0", - "react-native-share": "1.0.17", "react-native-sortable-listview": "^0.1.1", "react-native-splash-screen": "1.0.9", "react-native-swiper": "1.5.3", - "react-native-tcp": "^2.0.4", - "react-native-udp": "^1.2.6", - "react-native-vector-icons": "^2.0.3", - "react-native-webview-bridge": "github:status-im/react-native-webview-bridge#0.33.10", + "react-native-tcp": "^3.2.1", + "react-native-udp": "^2.0.0", + "react-native-vector-icons": "^4.0.1", + "react-native-webview-bridge": "github:status-im/react-native-webview-bridge#react-native-0.40", "readable-stream": "^1.0.33", "realm": "^0.14.3", "stream-browserify": "^1.0.0", + "string_decoder": "^0.10.31", "timers-browserify": "^1.4.2", "tty-browserify": "0.0.0", "url": "^0.10.3", diff --git a/postinstall.sh b/postinstall.sh index 148253d8b4..31f6436159 100755 --- a/postinstall.sh +++ b/postinstall.sh @@ -3,8 +3,9 @@ # rn-nodeify # temporary hack due to https://github.com/facebook/react-native/issues/4968 ./node_modules/.bin/rn-nodeify --install --hack; -npm install --save react@15.3.1; -npm install --save react-native-tcp@2.0.4; +npm install --save react@16.0.0-alpha.6; +npm install --save react-native-tcp@3.2.1; +npm install --save react-native-udp@2.0.0; # symlink for re-natal if ! [ -f re-natal ]; then diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index cab32f3b20..a01a227089 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -173,7 +173,7 @@ :renderScrollComponent #(invertible-scroll-view (js->clj %)) :onEndReached (when-not loaded? #(dispatch [:load-more-messages])) :enableEmptySections true - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :dataSource (to-datasource-inverted messages)}])) (defview chat [] diff --git a/src/status_im/chat/views/input/input.cljs b/src/status_im/chat/views/input/input.cljs index c0f3b82a34..4824bd6593 100644 --- a/src/status_im/chat/views/input/input.cljs +++ b/src/status_im/chat/views/input/input.cljs @@ -49,7 +49,7 @@ [icon :input_list style/commands-list-icon])]]] [scroll-view {:horizontal true :showsHorizontalScrollIndicator false - :keyboardShouldPersistTaps true} + :keyboardShouldPersistTaps :always} (let [requests-names (map :type requests) all-commands (merge (into {} commands) (select-keys responses requests-names)) all-commands-indexed (map-indexed vector (vals all-commands))] diff --git a/src/status_im/chat/views/input/suggestions.cljs b/src/status_im/chat/views/input/suggestions.cljs index 33f967a819..2ffca3c0fa 100644 --- a/src/status_im/chat/views/input/suggestions.cljs +++ b/src/status_im/chat/views/input/suggestions.cljs @@ -58,7 +58,7 @@ :draggable? false :height 212} [view {:flex 1} - [scroll-view {:keyboardShouldPersistTaps true} + [scroll-view {:keyboardShouldPersistTaps :always} (when (seq requests) [view [item-title false (label :t/suggestions-requests)] diff --git a/src/status_im/chats_list/screen.cljs b/src/status_im/chats_list/screen.cljs index 68bcb24814..091557cd3e 100644 --- a/src/status_im/chats_list/screen.cljs +++ b/src/status_im/chats_list/screen.cljs @@ -10,7 +10,6 @@ text icon image - linear-gradient touchable-highlight]] [status-im.components.native-action-button :refer [native-action-button]] [status-im.components.drawer.view :refer [open-drawer]] @@ -69,8 +68,8 @@ [native-action-button {:button-color color-blue :offset-x 16 :offset-y 22 - :hide-shadow true :spacing 13 + :hide-shadow true :on-press #(dispatch [:navigate-to :new-chat])}]) (defview chats-list [] @@ -89,7 +88,7 @@ :renderHeader renderers/list-header-renderer :renderFooter #(list-item [view [common/list-footer] - [common/bottom-shaddow]]) + [common/bottom-shadow]]) :renderSeparator renderers/list-separator-renderer :style (st/list-container tabs-hidden?)}] (when (and (not edit?) diff --git a/src/status_im/components/chat_icon/screen.cljs b/src/status_im/components/chat_icon/screen.cljs index 42aba3f83c..9df7b69e00 100644 --- a/src/status_im/components/chat_icon/screen.cljs +++ b/src/status_im/components/chat_icon/screen.cljs @@ -5,7 +5,6 @@ text image icon]] - [status-im.components.icons.custom-icons :refer [oct-icon]] [status-im.components.chat-icon.styles :as st] [status-im.components.styles :refer [default-chat-color]] [status-im.resources :as resources] @@ -33,17 +32,6 @@ [view online-dot-left] [view online-dot-right]]]]) -(defn contact-badge [type styles] - (when (= type :edit) - [view (:online-view styles) - (case type - :online [view - [view (:online-dot-left styles)] - [view (:online-dot-right styles)]] - :edit [view - [oct-icon {:name :pencil - :style st/photo-pencil}]])])) - (defview pending-contact-badge [chat-id {:keys [pending-wrapper pending-outer-circle pending-inner-circle]}] [pending-contact? [:get-in [:contacts chat-id :pending?]]] diff --git a/src/status_im/components/common/common.cljs b/src/status_im/components/common/common.cljs index bb39e16352..bb4e650a30 100644 --- a/src/status_im/components/common/common.cljs +++ b/src/status_im/components/common/common.cljs @@ -4,17 +4,17 @@ [status-im.utils.platform :as p] [status-im.components.common.styles :as st])) -(defn top-shaddow [] +(defn top-shadow [] (when p/android? [linear-gradient {:style st/gradient-bottom - :colors st/gradient-bottom-colors}])) + :colors st/gradient-top-colors}])) -(defn bottom-shaddow [] +(defn bottom-shadow [] (when p/android? [linear-gradient {:style st/gradient-top - :colors st/gradient-top-colors}])) + :colors st/gradient-bottom-colors}])) (defn separator [style & [wrapper-style]] [view (merge st/separator-wrapper wrapper-style) @@ -22,9 +22,9 @@ (defn form-spacer [] [view - [bottom-shaddow] + [bottom-shadow] [view st/form-spacer] - [top-shaddow]]) + [top-shadow]]) (defn list-separator [] [separator st/list-separator]) @@ -54,4 +54,4 @@ [context-menu [icon :options_gray] options]])] - [top-shaddow]]) + [top-shadow]]) diff --git a/src/status_im/components/common/styles.cljs b/src/status_im/components/common/styles.cljs index e5921f45df..292066026f 100644 --- a/src/status_im/components/common/styles.cljs +++ b/src/status_im/components/common/styles.cljs @@ -13,9 +13,8 @@ :backgroundColor color-light-gray}) (def gradient-top-colors - ["rgba(24, 52, 76, 0.165)" - "rgba(24, 52, 76, 0.03)" - "rgba(24, 52, 76, 0.01)"]) + ["rgba(25, 53, 76, 0.01)" + "rgba(25, 53, 76, 0.1)"]) (def gradient-bottom {:flexDirection :row @@ -23,8 +22,8 @@ :backgroundColor color-light-gray}) (def gradient-bottom-colors - ["rgba(24, 52, 76, 0.01)" - "rgba(24, 52, 76, 0.05)"]) + ["rgba(25, 53, 76, 0.1)" + "rgba(25, 53, 76, 0.01)"]) (def separator-wrapper {:background-color color-white}) diff --git a/src/status_im/components/icons/custom_icons.cljs b/src/status_im/components/icons/custom_icons.cljs index 8ce0b571ae..f88d23b6ab 100644 --- a/src/status_im/components/icons/custom_icons.cljs +++ b/src/status_im/components/icons/custom_icons.cljs @@ -2,7 +2,4 @@ (:require [reagent.core :as r])) (def ion-icon - (r/adapt-react-class (js/require "react-native-vector-icons/Ionicons"))) - -(def oct-icon - (r/adapt-react-class (js/require "react-native-vector-icons/Octicons"))) \ No newline at end of file + (r/adapt-react-class (.-default (js/require "react-native-vector-icons/Ionicons")))) \ No newline at end of file diff --git a/src/status_im/components/list_selection.cljs b/src/status_im/components/list_selection.cljs index 61b07b131f..82d00856a2 100644 --- a/src/status_im/components/list_selection.cljs +++ b/src/status_im/components/list_selection.cljs @@ -1,18 +1,19 @@ (ns status-im.components.list-selection (:require [re-frame.core :refer [dispatch]] [status-im.components.react :refer [copy-to-clipboard + sharing linking]] [status-im.utils.platform :refer [platform-specific]] [status-im.i18n :refer [label]])) -(def class (js/require "react-native-share")) - (defn open [opts] - (.open class (clj->js opts))) + (.share sharing (clj->js opts))) (defn share-options [text] - [{:text (label :t/sharing-copy-to-clipboard) :value #(copy-to-clipboard text)} - {:text (label :t/sharing-share) :value #(open {:message text})}]) + [{:text (label :t/sharing-copy-to-clipboard) + :value #(copy-to-clipboard text)} + {:text (label :t/sharing-share) + :value #(open {:message text})}]) (defn share [text dialog-title] (let [list-selection-fn (:list-selection-fn platform-specific)] diff --git a/src/status_im/components/react.cljs b/src/status_im/components/react.cljs index 341212e5b7..a1ad6e1dfc 100644 --- a/src/status_im/components/react.cljs +++ b/src/status_im/components/react.cljs @@ -9,8 +9,6 @@ (def react-native (js/require "react-native")) (def native-modules (.-NativeModules react-native)) (def device-event-emitter (.-DeviceEventEmitter react-native)) - -(def linear-gradient-module (js/require "react-native-linear-gradient")) (def dismiss-keyboard! (js/require "dismissKeyboard")) (def orientation (js/require "react-native-orientation")) (def back-android (get-react-property "BackAndroid")) @@ -23,7 +21,6 @@ (def app-registry (get-react-property "AppRegistry")) (def navigator (get-class "Navigator")) (def view (get-class "View")) -(def linear-gradient-class (adapt-class linear-gradient-module)) (def status-bar (get-class "StatusBar")) (def drawer-layout (adapt-class drawer)) @@ -108,9 +105,10 @@ (defn get-dimensions [name] (js->clj (.get dimensions name) :keywordize-keys true)) -(defn linear-gradient - [props & children] - (vec (concat [linear-gradient-class (merge {:inverted true} props)] children))) +(defn linear-gradient [props] + (let [class (js/require "react-native-linear-gradient") + gradient (adapt-class (.-default class))] + [gradient props])) (defn list-item [component] (r/as-element component)) @@ -129,10 +127,12 @@ ;; Clipboard +(def sharing + (.-Share js/ReactNative)) + (defn copy-to-clipboard [text] (.setString (.-Clipboard react-native) text)) - ;; Emoji (def emoji-picker-class (js/require "react-native-emoji-picker")) diff --git a/src/status_im/components/sync_state/gradient.cljs b/src/status_im/components/sync_state/gradient.cljs index c05f90795b..e49985e31a 100644 --- a/src/status_im/components/sync_state/gradient.cljs +++ b/src/status_im/components/sync_state/gradient.cljs @@ -111,8 +111,8 @@ [animated-view {:style (st/loading-wrapper sync-state-opacity)} [animated-view {:style (st/gradient-wrapper in-progress-opacity gradient-position)} [linear-gradient {:colors ["#89b1fe" "#8b5fe4" "#8b5fe4" "#89b1fe"] - :start [0, 1] - :end [1, 1] + :start {:x 0 :y 1} + :end {:x 1 :y 1} :locations [0 0.3 0.7 1] :style (st/gradient gradient-width)}]] (when (not= @sync-state :in-progress) diff --git a/src/status_im/components/sync_state/offline.cljs b/src/status_im/components/sync_state/offline.cljs index e6cfd64fe3..d8a46edf0e 100644 --- a/src/status_im/components/sync_state/offline.cljs +++ b/src/status_im/components/sync_state/offline.cljs @@ -4,7 +4,6 @@ [status-im.components.react :refer [view text animated-view - linear-gradient get-dimensions]] [status-im.components.sync-state.styles :as st] [status-im.components.animation :as anim] diff --git a/src/status_im/components/tabs/tabs.cljs b/src/status_im/components/tabs/tabs.cljs index 266e3e002c..f0ad483656 100644 --- a/src/status_im/components/tabs/tabs.cljs +++ b/src/status_im/components/tabs/tabs.cljs @@ -6,8 +6,7 @@ text-input text image - touchable-highlight - linear-gradient]] + touchable-highlight]] [reagent.core :as r] [status-im.components.tabs.styles :as st] [status-im.components.tabs.tab :refer [tab]] diff --git a/src/status_im/components/text_input_with_label/styles.cljs b/src/status_im/components/text_input_with_label/styles.cljs index b385ea9367..e07ba21b40 100644 --- a/src/status_im/components/text_input_with_label/styles.cljs +++ b/src/status_im/components/text_input_with_label/styles.cljs @@ -19,7 +19,7 @@ :letter-spacing -0.2}}) (defstyle component-container - {:padding-left 16 + {:margin-left 16 :android {:min-height 76} :ios {:min-height 78}}) diff --git a/src/status_im/contacts/screen.cljs b/src/status_im/contacts/screen.cljs index 1c7993c11a..0241808222 100644 --- a/src/status_im/contacts/screen.cljs +++ b/src/status_im/contacts/screen.cljs @@ -95,7 +95,7 @@ :uppercase? (get-in platform-specific [:uppercase?]) :font (get-in platform-specific [:component-styles :contacts :show-all-text-font])} (str (- contacts-count contacts-limit) " " (label :t/more))]]]]]) - [common/bottom-shaddow]])) + [common/bottom-shadow]])) (defview contact-group-view [{:keys [group] :as params}] [contacts [:all-added-group-contacts-with-limit (:group-id group) contacts-limit] @@ -105,10 +105,10 @@ (defn contacts-action-button [] [native-action-button {:button-color color-blue - :offset-x 16 - :offset-y 22 - :hide-shadow true - :spacing 13} + :offset-x 16 + :offset-y 22 + :hide-shadow true + :spacing 13} [native-action-button-item {:title (label :t/new-contact) :buttonColor :#9b59b6 diff --git a/src/status_im/contacts/views/contact_list.cljs b/src/status_im/contacts/views/contact_list.cljs index de834d0d93..61eee65fb7 100644 --- a/src/status_im/contacts/views/contact_list.cljs +++ b/src/status_im/contacts/views/contact_list.cljs @@ -57,7 +57,7 @@ [list-view {:dataSource (lw/to-datasource contacts) :enableEmptySections true :renderRow (render-row group edit?) - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :renderHeader renderers/list-header-renderer :renderFooter renderers/list-footer-renderer :renderSeparator renderers/list-separator-renderer diff --git a/src/status_im/contacts/views/contact_list_modal.cljs b/src/status_im/contacts/views/contact_list_modal.cljs index 7915af9cb0..88ffaa77fb 100644 --- a/src/status_im/contacts/views/contact_list_modal.cljs +++ b/src/status_im/contacts/views/contact_list_modal.cljs @@ -69,16 +69,16 @@ :enableEmptySections true :renderRow (render-row click-handler action params) :bounces false - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :renderHeader #(list-item [view [actions-view action click-handler] - [common/bottom-shaddow] + [common/bottom-shadow] [common/form-title (label :t/choose-from-contacts) - {:count-value (count contacts)}] + {:count-value (count contacts)}] [common/list-header]]) :renderFooter #(list-item [view [common/list-footer] - [common/bottom-shaddow]]) + [common/bottom-shadow]]) :renderSeparator renderers/list-separator-renderer :style st/contacts-list-modal}]]]) diff --git a/src/status_im/contacts/views/new_contact.cljs b/src/status_im/contacts/views/new_contact.cljs index eeb49ae1d9..9e1f8a6f05 100644 --- a/src/status_im/contacts/views/new_contact.cljs +++ b/src/status_im/contacts/views/new_contact.cljs @@ -5,7 +5,6 @@ [status-im.components.react :refer [view text image - linear-gradient touchable-highlight]] [status-im.components.text-field.view :refer [text-field]] [status-im.utils.identicon :refer [identicon]] diff --git a/src/status_im/new_chat/screen.cljs b/src/status_im/new_chat/screen.cljs index 35df0908e9..d776c08ee1 100644 --- a/src/status_im/new_chat/screen.cljs +++ b/src/status_im/new_chat/screen.cljs @@ -7,7 +7,6 @@ action-separator]] [status-im.components.action-button.styles :refer [actions-list]] [status-im.components.react :refer [view text - linear-gradient image touchable-highlight list-view @@ -63,16 +62,16 @@ :enableEmptySections true :renderRow (contact-list-row) :bounces false - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :renderHeader #(list-item - [view - [options-list] - [common/bottom-shaddow] - [common/form-title (label :t/choose-from-contacts) - {:count-value (count contacts)}] - [common/list-header]]) + [view + [options-list] + [common/bottom-shadow] + [common/form-title (label :t/choose-from-contacts) + {:count-value (count contacts)}] + [common/list-header]]) :renderSeparator renderers/list-separator-renderer :renderFooter #(list-item [view [common/list-footer] - [common/bottom-shaddow]]) + [common/bottom-shadow]]) :style st/contacts-list}])]]) diff --git a/src/status_im/new_group/screen_private.cljs b/src/status_im/new_group/screen_private.cljs index dc60f8899b..e59adc6384 100644 --- a/src/status_im/new_group/screen_private.cljs +++ b/src/status_im/new_group/screen_private.cljs @@ -87,7 +87,7 @@ :enableEmptySections true :renderRow render-row :bounces false - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :renderSeparator renderers/list-separator-renderer}]] (when save-btn-enabled? [sticky-button (label :t/save) diff --git a/src/status_im/new_group/views/contact_list.cljs b/src/status_im/new_group/views/contact_list.cljs index 3aad6fd504..76fc860b73 100644 --- a/src/status_im/new_group/views/contact_list.cljs +++ b/src/status_im/new_group/views/contact_list.cljs @@ -29,7 +29,7 @@ :enableEmptySections true :renderRow renderer-function :bounces false - :keyboardShouldPersistTaps true + :keyboardShouldPersistTaps :always :renderSeparator renderers/list-separator-renderer :renderFooter renderers/list-footer-renderer :renderHeader renderers/list-header-renderer}]]) diff --git a/src/status_im/new_group/views/contact_toggle_list.cljs b/src/status_im/new_group/views/contact_toggle_list.cljs index 9ff57dfc15..836a3904b0 100644 --- a/src/status_im/new_group/views/contact_toggle_list.cljs +++ b/src/status_im/new_group/views/contact_toggle_list.cljs @@ -51,7 +51,7 @@ :renderFooter renderers/list-footer-renderer :renderHeader renderers/list-header-renderer :style cst/contacts-list - :keyboardShouldPersistTaps true}]]) + :keyboardShouldPersistTaps :always}]]) (defview contact-toggle-list [] [contacts [:all-added-group-contacts-filtered] diff --git a/src/status_im/new_group/views/reorder_groups.cljs b/src/status_im/new_group/views/reorder_groups.cljs index 169b6cccb6..80c7b0c60a 100644 --- a/src/status_im/new_group/views/reorder_groups.cljs +++ b/src/status_im/new_group/views/reorder_groups.cljs @@ -38,8 +38,8 @@ (fn [_ row-id _] (list-item (if (= row-id last) - ^{:key "bottom-shaddow"} - [common/bottom-shaddow] + ^{:key "bottom-shadow"} + [common/bottom-shadow] ^{:key row-id} [view st/order-item-separator-wrapper [view st/order-item-separator]])))) @@ -52,7 +52,7 @@ [status-bar] [toolbar-view] [view st/reorder-list-container - [common/top-shaddow] + [common/top-shadow] [sortable-list-view {:data groups :order order diff --git a/src/status_im/profile/screen.cljs b/src/status_im/profile/screen.cljs index 6e62d2598a..d25e3315b7 100644 --- a/src/status_im/profile/screen.cljs +++ b/src/status_im/profile/screen.cljs @@ -6,8 +6,8 @@ [status-im.contacts.styles :as cst] [status-im.components.common.common :refer [separator form-spacer - top-shaddow - bottom-shaddow]] + top-shadow + bottom-shadow]] [status-im.components.styles :refer [color-blue color-gray5]] [status-im.components.context-menu :refer [context-menu]] [status-im.components.action-button.action-button :refer [action-button @@ -202,7 +202,7 @@ [form-spacer] [view st/profile-info-container [my-profile-info current-account] - [bottom-shaddow]]]) + [bottom-shadow]]]) (defview profile [] [{:keys [pending? @@ -223,4 +223,4 @@ [form-spacer] [view st/profile-info-container [profile-info contact] - [bottom-shaddow]]]]) \ No newline at end of file + [bottom-shadow]]]])