From 03e62548a611b67ffc3f295d7141689ccfade707 Mon Sep 17 00:00:00 2001 From: alwxndr Date: Mon, 29 Jan 2018 22:15:11 +0100 Subject: [PATCH] [#3007] Removed location command --- .re-natal | 1 - android/app/build.gradle | 1 - android/app/src/main/AndroidManifest.xml | 1 - .../im/status/ethereum/MainApplication.java | 2 - android/settings.gradle | 6 - ios/Mapbox.framework | 1 - ios/StatusIm.xcodeproj/project.pbxproj | 114 ----------- package.json | 1 - .../react_native/js_dependencies.cljs | 1 - resources/default_contacts.json | 13 -- resources/js/bots/mailman/bot.js | 99 ---------- resources/js/bots/mailman/translations.js | 184 ------------------ resources/js/status.js | 25 --- scripts/setup | 3 - src/status_im/bots/constants.cljs | 5 - src/status_im/chat/models/commands.cljs | 1 - src/status_im/chat/models/input.cljs | 1 - src/status_im/chat/specs.cljs | 1 - .../chat/views/api/geolocation/styles.cljs | 91 --------- .../chat/views/api/geolocation/views.cljs | 179 ----------------- src/status_im/chat/views/message/message.cljs | 12 +- src/status_im/commands/utils.cljs | 8 +- .../realm/schemas/account/v21/core.cljs | 16 +- src/status_im/i18n.cljs | 19 +- src/status_im/translations/de.cljs | 10 - src/status_im/translations/en.cljs | 10 - src/status_im/translations/es.cljs | 10 - src/status_im/translations/fr.cljs | 10 - src/status_im/translations/it.cljs | 10 - src/status_im/translations/ja.cljs | 10 - src/status_im/translations/ko.cljs | 10 - src/status_im/translations/lt.cljs | 10 - src/status_im/translations/ms.cljs | 10 - src/status_im/translations/nb.cljs | 10 - src/status_im/translations/ru.cljs | 10 - src/status_im/translations/sr_rs_cyrl.cljs | 10 - src/status_im/translations/sv.cljs | 10 - src/status_im/translations/uk.cljs | 10 - src/status_im/translations/zh_hans.cljs | 10 - src/status_im/translations/zh_hant.cljs | 10 - src/status_im/translations/zh_hant_hk.cljs | 10 - src/status_im/translations/zh_hant_sg.cljs | 10 - src/status_im/translations/zh_hant_tw.cljs | 10 - .../ui/components/list_selection.cljs | 16 -- src/status_im/ui/components/mapbox.cljs | 22 --- src/status_im/ui/components/permissions.cljs | 3 +- src/status_im/ui/components/react.cljs | 2 - src/status_im/ui/screens/contacts/subs.cljs | 3 +- src/status_im/ui/screens/db.cljs | 1 - src/status_im/ui/screens/events.cljs | 29 --- src/status_im/utils/js_resources.cljs | 3 - .../react_native/js_dependencies.cljs | 1 - 52 files changed, 29 insertions(+), 1026 deletions(-) delete mode 120000 ios/Mapbox.framework delete mode 100644 resources/js/bots/mailman/bot.js delete mode 100644 resources/js/bots/mailman/translations.js delete mode 100644 src/status_im/bots/constants.cljs delete mode 100644 src/status_im/chat/views/api/geolocation/styles.cljs delete mode 100644 src/status_im/chat/views/api/geolocation/views.cljs delete mode 100644 src/status_im/ui/components/mapbox.cljs diff --git a/.re-natal b/.re-natal index cb17125258..62a72a72d9 100644 --- a/.re-natal +++ b/.re-natal @@ -48,7 +48,6 @@ "nfc-react-native", "react-native-http-bridge", "emojilib", - "react-native-mapbox-gl", "react-native-config", "react-native-svg", "rn-snoopy", diff --git a/android/app/build.gradle b/android/app/build.gradle index 855967871d..9383131cf9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -187,7 +187,6 @@ android { dependencies { implementation project(':react-native-svg') - implementation project(':react-native-mapbox-gl') implementation 'com.android.support:multidex:1.0.2' implementation project(':react-native-http-bridge') implementation project(':nfc-react-native') diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9c5a84ccc4..2f8d19b62a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -51,7 +51,6 @@ android:enabled="true" android:exported="true"/> - 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 c8d19d14d7..2f7b4b8893 100644 --- a/android/app/src/main/java/im/status/ethereum/MainApplication.java +++ b/android/app/src/main/java/im/status/ethereum/MainApplication.java @@ -8,7 +8,6 @@ import org.devio.rn.splashscreen.SplashScreenReactPackage; import com.centaurwarchief.smslistener.SmsListenerPackage; import com.facebook.react.ReactApplication; import com.horcrux.svg.SvgPackage; -import com.mapbox.reactnativemapboxgl.ReactNativeMapboxGLPackage; import com.evollu.react.fcm.FIRMessagingPackage; import com.lugg.ReactNativeConfig.ReactNativeConfigPackage; import com.facebook.react.ReactNativeHost; @@ -60,7 +59,6 @@ public class MainApplication extends MultiDexApplication implements ReactApplica List packages = new ArrayList(Arrays.asList( new MainReactPackage(), new SvgPackage(), - new ReactNativeMapboxGLPackage(), new FIRMessagingPackage(), new HttpServerReactPackage(), new NfcReactNativePackage(), diff --git a/android/settings.gradle b/android/settings.gradle index 2b9bdd65b5..8f76510db6 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,9 +1,6 @@ rootProject.name = 'StatusIm' include ':react-native-svg' project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') - -include ':react-native-mapbox-gl' -project(':react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mapbox-gl/android') include ':react-native-fcm' project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android') include ':app' @@ -41,12 +38,9 @@ include ':react-native-orientation', ':app' project(':react-native-orientation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-orientation/android') include ':react-native-fs' project(':react-native-fs').projectDir = new File(settingsDir, '../node_modules/react-native-fs/android') - 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-config' project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android') \ No newline at end of file diff --git a/ios/Mapbox.framework b/ios/Mapbox.framework deleted file mode 120000 index a9b2ed5381..0000000000 --- a/ios/Mapbox.framework +++ /dev/null @@ -1 +0,0 @@ -../node_modules/react-native-mapbox-gl/ios/Mapbox.framework \ No newline at end of file diff --git a/ios/StatusIm.xcodeproj/project.pbxproj b/ios/StatusIm.xcodeproj/project.pbxproj index 4e325634e9..4f777e96eb 100644 --- a/ios/StatusIm.xcodeproj/project.pbxproj +++ b/ios/StatusIm.xcodeproj/project.pbxproj @@ -61,9 +61,6 @@ 9ED2F45E1D9D535A00B36508 /* SF-UI-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9ED2F45D1D9D52DD00B36508 /* SF-UI-Text-Regular.otf */; }; 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 */; }; - 9EE470511ED0079E0048FD10 /* Mapbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EE470501ED0079E0048FD10 /* Mapbox.framework */; }; - 9EE470521ED0079E0048FD10 /* Mapbox.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9EE470501ED0079E0048FD10 /* Mapbox.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9EE470541ED007E10048FD10 /* libRCTMapboxGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EE4702F1ED0071A0048FD10 /* libRCTMapboxGL.a */; }; 9EE89E271E03FCB7007D3C25 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B24FC7F21DE718EF00D694FF /* libSplashScreen.a */; }; 9EE89E2D1E03FD9F007D3C25 /* libimageCropPicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 20A5C9531D927137002C4965 /* libimageCropPicker.a */; }; 9EF0836B1F3B53AB00876A8F /* libReactNativeConfig.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EF083611F3B538B00876A8F /* libReactNativeConfig.a */; }; @@ -82,7 +79,6 @@ CE4E31B31D8695250033ED64 /* Statusgo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.framework */; }; D28AEFB4C39548EB80416889 /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 52E205D210BC48B7A553BB62 /* Entypo.ttf */; }; E0AD9E8F495A4907B65104BF /* libRCTImageResizer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BEE3436791D42248F853999 /* libRCTImageResizer.a */; }; - EE99697599F14E309CD2D44C /* libRCTMapboxGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B2E945DF3D3D4E58845B95DA /* libRCTMapboxGL.a */; }; EF2B5857B4A34E0C9707FB3F /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B3B19223008342D096AA356E /* Octicons.ttf */; }; F9238D6C1E5F055900C047B9 /* SF-UI-Text-Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F9238D6B1E5F055900C047B9 /* SF-UI-Text-Semibold.otf */; }; FD4F213C3873473CB703B1D2 /* libRNFS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 674B3D9595A047AB8D518F4E /* libRNFS.a */; }; @@ -257,20 +253,6 @@ remoteGlobalIDString = 134814201AA4EA6300B7C361; remoteInfo = RNFIRMessaging; }; - 922C4D2D1F4D8EBB0033C753 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2C513ED88AE849F8A4CA3475 /* RCTMapboxGL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = C5DBB3401AF2EF2B00E611A9; - remoteInfo = RCTMapboxGL; - }; - 922C4D2F1F4D8EBB0033C753 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 2C513ED88AE849F8A4CA3475 /* RCTMapboxGL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = C5DBB34B1AF2EF2B00E611A9; - remoteInfo = RCTMapboxGLTests; - }; 92925B671F571DE600203EEB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 1E74DC52A1E449A2BA858B14 /* RNSVG.xcodeproj */; @@ -341,20 +323,6 @@ remoteGlobalIDString = 0974579A1D2A440A000D9368; remoteInfo = RCTWKWebView; }; - 9EE4702E1ED0071A0048FD10 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9EE4701B1ED007190048FD10 /* RCTMapboxGL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = C5DBB3401AF2EF2B00E611A9; - remoteInfo = RCTMapboxGL; - }; - 9EE470301ED0071A0048FD10 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9EE4701B1ED007190048FD10 /* RCTMapboxGL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = C5DBB34B1AF2EF2B00E611A9; - remoteInfo = RCTMapboxGLTests; - }; 9EF083601F3B538B00876A8F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9EF083381F3B538A00876A8F /* ReactNativeConfig.xcodeproj */; @@ -562,7 +530,6 @@ files = ( 20B6B6851D92C42600CC5C6A /* RSKImageCropper.framework in Embed Frameworks */, 20B6B6881D92C42600CC5C6A /* QBImagePicker.framework in Embed Frameworks */, - 9EE470521ED0079E0048FD10 /* Mapbox.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -603,7 +570,6 @@ 20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = QBImagePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2756305FAFF144C4A6B0A039 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = ""; }; 2BEE3436791D42248F853999 /* libRCTImageResizer.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTImageResizer.a; sourceTree = ""; }; - 2C513ED88AE849F8A4CA3475 /* RCTMapboxGL.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTMapboxGL.xcodeproj; path = "../node_modules/react-native-mapbox-gl/ios/RCTMapboxGL.xcodeproj"; sourceTree = ""; }; 305F194186D848FDB07AF34C /* RNFS.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNFS.xcodeproj; path = "../node_modules/react-native-fs/RNFS.xcodeproj"; sourceTree = ""; }; 359B076A658B4FBAB5128B03 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; 38A44830EC5708E89387F641 /* Pods-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.release.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.release.xcconfig"; sourceTree = ""; }; @@ -648,8 +614,6 @@ 9ED2F45C1D9D52C100B36508 /* SF-UI-Text-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Text-Medium.otf"; sourceTree = ""; }; 9ED2F45D1D9D52DD00B36508 /* SF-UI-Text-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Text-Regular.otf"; sourceTree = ""; }; 9ED2F4601D9D577B00B36508 /* SF-UI-Text-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SF-UI-Text-Bold.otf"; sourceTree = ""; }; - 9EE4701B1ED007190048FD10 /* RCTMapboxGL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTMapboxGL.xcodeproj; path = "../node_modules/react-native-mapbox-gl/ios/RCTMapboxGL.xcodeproj"; sourceTree = ""; }; - 9EE470501ED0079E0048FD10 /* Mapbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Mapbox.framework; sourceTree = ""; }; 9EF083381F3B538A00876A8F /* ReactNativeConfig.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeConfig.xcodeproj; path = "../node_modules/react-native-config/ios/ReactNativeConfig.xcodeproj"; sourceTree = ""; }; 9F1854E6D9654226B1FC8308 /* RCTCamera.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RCTCamera.xcodeproj"; 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 = ""; }; @@ -660,7 +624,6 @@ 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 = ""; }; B2DEA0A41E49E32000FA28D6 /* RCTHttpServer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTHttpServer.xcodeproj; path = "../node_modules/react-native-http-bridge/ios/RCTHttpServer.xcodeproj"; sourceTree = ""; }; - B2E945DF3D3D4E58845B95DA /* libRCTMapboxGL.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTMapboxGL.a; sourceTree = ""; }; B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = ""; }; B3B19223008342D096AA356E /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; }; C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libTcpSockets.a; sourceTree = ""; }; @@ -734,12 +697,9 @@ 5F8585D411844E5981B94F40 /* libRNInstabug.a in Frameworks */, 8E55E6877F950B81C8D711C5 /* libPods-StatusIm.a in Frameworks */, 925C1F491F7B73B20063DFA0 /* FirebaseInstanceID.framework in Frameworks */, - 9EE470511ED0079E0048FD10 /* Mapbox.framework in Frameworks */, - 9EE470541ED007E10048FD10 /* libRCTMapboxGL.a in Frameworks */, 9EF0836B1F3B53AB00876A8F /* libReactNativeConfig.a in Frameworks */, B957A49EB0DE44D9A31CAF2D /* libRNSVG.a in Frameworks */, 5974D2035B8B47E0946B63B6 /* libRNFIRMessaging.a in Frameworks */, - EE99697599F14E309CD2D44C /* libRCTMapboxGL.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1051,7 +1011,6 @@ F3548417D8DA4362B6796A54 /* RNInstabug.xcodeproj */, 1E74DC52A1E449A2BA858B14 /* RNSVG.xcodeproj */, F89A8F8005874B86B63C22E3 /* RNFIRMessaging.xcodeproj */, - 2C513ED88AE849F8A4CA3475 /* RCTMapboxGL.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -1069,8 +1028,6 @@ isa = PBXGroup; children = ( 92A0DF491F4DE3A0002051BC /* GoogleService-Info.plist */, - 9EE470501ED0079E0048FD10 /* Mapbox.framework */, - 9EE4701B1ED007190048FD10 /* RCTMapboxGL.xcodeproj */, 20B6B6861D92C42600CC5C6A /* QBImagePicker.framework */, 20B6B6831D92C42600CC5C6A /* RSKImageCropper.framework */, 13B07FAE1A68108700A75B9A /* StatusIm */, @@ -1104,15 +1061,6 @@ name = Products; sourceTree = ""; }; - 922C4D171F4D8EBB0033C753 /* Products */ = { - isa = PBXGroup; - children = ( - 922C4D2E1F4D8EBB0033C753 /* libRCTMapboxGL.a */, - 922C4D301F4D8EBB0033C753 /* RCTMapboxGLTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; 92925B361F571DE600203EEB /* Products */ = { isa = PBXGroup; children = ( @@ -1146,15 +1094,6 @@ name = Products; sourceTree = ""; }; - 9EE4701C1ED007190048FD10 /* Products */ = { - isa = PBXGroup; - children = ( - 9EE4702F1ED0071A0048FD10 /* libRCTMapboxGL.a */, - 9EE470311ED0071A0048FD10 /* RCTMapboxGLTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; 9EF083391F3B538A00876A8F /* Products */ = { isa = PBXGroup; children = ( @@ -1236,7 +1175,6 @@ 4EC426A98043452BB6F9C134 /* libRNInstabug.a */, AF2BF381BC7B4EB0887F0091 /* libRNSVG.a */, 7F752F17B1E04216B1337A72 /* libRNFIRMessaging.a */, - B2E945DF3D3D4E58845B95DA /* libRCTMapboxGL.a */, ); name = "Recovered References"; sourceTree = ""; @@ -1286,7 +1224,6 @@ 9E71BA90038083A3D24E18E9 /* [CP] Embed Pods Frameworks */, E883D1F9B22B8292CC879292 /* [CP] Copy Pods Resources */, E3914A731DF919ED00EBB515 /* Run Script */, - 9EE470531ED007A80048FD10 /* ShellScript */, ); buildRules = ( ); @@ -1385,14 +1322,6 @@ ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; }, - { - ProductGroup = 9EE4701C1ED007190048FD10 /* Products */; - ProjectRef = 9EE4701B1ED007190048FD10 /* RCTMapboxGL.xcodeproj */; - }, - { - ProductGroup = 922C4D171F4D8EBB0033C753 /* Products */; - ProjectRef = 2C513ED88AE849F8A4CA3475 /* RCTMapboxGL.xcodeproj */; - }, { ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; @@ -1648,20 +1577,6 @@ remoteRef = 922C4C4A1F4D5C3F0033C753 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 922C4D2E1F4D8EBB0033C753 /* libRCTMapboxGL.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTMapboxGL.a; - remoteRef = 922C4D2D1F4D8EBB0033C753 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 922C4D301F4D8EBB0033C753 /* RCTMapboxGLTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RCTMapboxGLTests.xctest; - remoteRef = 922C4D2F1F4D8EBB0033C753 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 92925B681F571DE600203EEB /* libRNSVG.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1732,20 +1647,6 @@ remoteRef = 9EC013781E06FB1900155B5C /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 9EE4702F1ED0071A0048FD10 /* libRCTMapboxGL.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTMapboxGL.a; - remoteRef = 9EE4702E1ED0071A0048FD10 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 9EE470311ED0071A0048FD10 /* RCTMapboxGLTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = RCTMapboxGLTests.xctest; - remoteRef = 9EE470301ED0071A0048FD10 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; 9EF083611F3B538B00876A8F /* libReactNativeConfig.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -2081,19 +1982,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 9EE470531ED007A80048FD10 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework/strip-frameworks.sh\""; - }; E3914A731DF919ED00EBB515 /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; @@ -2283,7 +2171,6 @@ "$(SRCROOT)/../node_modules/react-native-config/ios/**", "$(SRCROOT)/../node_modules/react-native-svg/ios/**", "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-mapbox-gl/ios/**", ); INFOPLIST_FILE = StatusIm/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -2342,7 +2229,6 @@ "$(SRCROOT)/../node_modules/react-native-config/ios/**", "$(SRCROOT)/../node_modules/react-native-svg/ios/**", "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-mapbox-gl/ios/**", ); INFOPLIST_FILE = StatusIm/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; diff --git a/package.json b/package.json index 9dae71066f..e4b57fe843 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "react-native-invertible-scroll-view": "1.1.0", "react-native-level-fs": "3.0.0", "react-native-linear-gradient": "2.4.0", - "react-native-mapbox-gl": "github:status-im/react-native-mapbox-gl", "react-native-orientation": "3.1.0", "react-native-os": "1.1.0", "react-native-popup-menu": "0.8.3", diff --git a/react-native/src/status_im/react_native/js_dependencies.cljs b/react-native/src/status_im/react_native/js_dependencies.cljs index ef96703add..86107e04e6 100644 --- a/react-native/src/status_im/react_native/js_dependencies.cljs +++ b/react-native/src/status_im/react_native/js_dependencies.cljs @@ -19,7 +19,6 @@ (def image-resizer (js/require "react-native-image-resizer")) (def instabug (js/require "instabug-reactnative")) (def linear-gradient (js/require "react-native-linear-gradient")) -(def mapbox-gl (js/require "react-native-mapbox-gl")) (def nfc (js/require "nfc-react-native")) (def orientation (js/require "react-native-orientation")) (def popup-menu (js/require "react-native-popup-menu")) diff --git a/resources/default_contacts.json b/resources/default_contacts.json index b28d8170b3..247e26ac39 100644 --- a/resources/default_contacts.json +++ b/resources/default_contacts.json @@ -1,16 +1,4 @@ { - "mailman": - { - "name": - { - "en": "Mailman", - "ru": "Печкин" - }, - "dapp?": true, - "hide-contact?": true, - "bot-url": "local://mailman-bot" - }, - "transactor": { "name": @@ -21,7 +9,6 @@ "hide-contact?": true, "bot-url": "local://transactor-bot" }, - "demo-bot": { "name": diff --git a/resources/js/bots/mailman/bot.js b/resources/js/bots/mailman/bot.js deleted file mode 100644 index 859d49d310..0000000000 --- a/resources/js/bots/mailman/bot.js +++ /dev/null @@ -1,99 +0,0 @@ -function locationsSuggestions (params) { - var result = {title: I18n.t("location_suggestions_title")}; - var seqArg = params["seq-arg"] ? params["seq-arg"] : ""; - - if (seqArg === "Dropped pin") - { - result.showBack = true; - result.height = "max"; - result.markup = ['view', {}, - ['dropped-pin']]; - } - else if (seqArg != "") - { - result.showBack = true; - result.markup = ['scroll-view', {keyboardShouldPersistTaps: "always"}, - ['view', {}, - ['places-search']]]; - } - else - { - result.markup = ['scroll-view', {keyboardShouldPersistTaps: "always"}, - ['view', {}, - ['current-location-map'], - ['current-location'], - ['separator'], - ['places-nearby']]]; - } - - return result; -} - -status.command({ - name: "location", - title: I18n.t('location_title'), - scope: ["global", "personal-chats", "group-chats", "public-chats", "registered", "humans"], - description: I18n.t('location_description'), - sequentialParams: true, - hideSendButton: true, - params: [{ - name: "address", - type: status.types.TEXT, - placeholder: I18n.t('location_address'), - suggestions: locationsSuggestions - }], - preview: function (params) { - var address = params.address.split("&"); - var text = status.components.text( - { - style: { - marginTop: 0, - marginHorizontal: 0, - fontSize: 15, - lineHeight: 23, - fontFamily: "font", - color: "black" - } - }, address[0]); - var uri = "https://api.mapbox.com/styles/v1/mapbox/streets-v10/static/" + - address[1] + "," + address[2] + ",10,20" + - "/175x58?access_token=pk.eyJ1Ijoic3RhdHVzaW0iLCJhIjoiY2oydmtnZjRrMDA3czMzcW9kemR4N2lxayJ9.Rz8L6xdHBjfO8cR3CDf3Cw"; - - var image = status.components.image( - { - source: {uri: uri}, - style: { - borderRadius: 5, - marginTop: 12, - height: 58 - } - } - ); - - return {markup: ['view', {}, - text, - ['view', {}, - image, - ['view', {style: {position: "absolute", - top: 0, - right: 0, - bottom: 0, - left: 0, - justifyContent: "center", - alignItems: "center"}}, - ['view', {style: {borderColor: "#628fe3", - backgroundColor: "#FFFFFF", - borderWidth: 4, - borderRadius: 8, - height: 15, - width: 15}}]]]]}; - }, - shortPreview: function (params) { - return { - markup: status.components.chatPreviewText( - {}, - I18n.t('location_title') + ": " + params.address - ) - }; - } -}); diff --git a/resources/js/bots/mailman/translations.js b/resources/js/bots/mailman/translations.js deleted file mode 100644 index 0f3880aab0..0000000000 --- a/resources/js/bots/mailman/translations.js +++ /dev/null @@ -1,184 +0,0 @@ -I18n.translations = { - en: { - location_title: 'Location', - location_suggestions_title: 'Send location', - location_description: 'Share your location', - location_address: 'address' - }, - ru: { - location_title: 'Местоположение', - location_suggestions_title: 'Отправить местоположение', - location_description: 'Поделитесь своим местоположением', - location_address: 'Адрес' - }, - af: { - location_title: 'Ligging', - location_description: 'Deel jou ligging', - location_address: 'Addres' - }, - ar: { - location_title: 'الموقع', - location_description: 'شارك موقعك', - location_address: 'العنوان' - }, - 'zh-hant': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - 'zh-hant-tw': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - 'zh-hant-sg': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - 'zh-hant-hk': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - 'zh-hans': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - 'zh-yue': { - location_title: '所在位置', - location_description: '分享所在位置', - location_address: '地址' - }, - 'zh-wuu': { - location_title: '位置', - location_description: '分享你的位置', - location_address: '地址' - }, - nl: { - location_title: 'Locatie', - location_description: 'Deel je locatie', - location_address: 'Adres' - }, - fr: { - location_title: 'Emplacement', - location_description: 'Partager votre emplacement', - location_address: 'Adresse' - }, - de: { - location_title: 'Ort', - location_description: 'Teilen Sie Ihren Ort', - location_address: 'Adresse' - }, - hi: { - location_title: 'स्थान', - location_description: 'अपना स्थान साझा करें', - location_address: 'पता' - }, - hu: { - location_title: 'Helyszín', - location_description: 'Helyszín megosztása', - location_address: 'Cím' - }, - it: { - location_title: 'Posizione', - location_description: 'Condividi la tua posizione', - location_address: 'Indirizzo' - }, - ja: { - location_title: '位置', - location_description: '位置情報を共有', - location_address: 'アドレス' - }, - ko: { - location_title: '위치', - location_description: '내 위치 공유하기', - location_address: '주소' - }, - pl: { - location_title: 'Lokalizacja', - location_description: 'Udostępnij swoją lokalizację', - location_address: 'Adres' - }, - 'pt-br': { - location_title: 'Localização', - location_description: 'Compartilhar sua localização', - location_address: 'Endereço' - }, - 'pt-pt': { - location_title: 'Location', - location_description: 'Partilhar a sua localização', - location_address: 'Endereço' - }, - ro: { - location_title: 'Locație', - location_description: "Partajează locația", - location_address: 'Adresă' - }, - sl: { - location_title: 'Lokacija', - location_description: 'Deli svojo lokacijo', - location_address: 'Naslov' - }, - es: { - location_title: 'Ubicación', - location_description: 'Comparte tu ubicación', - location_address: 'Dirección' - }, - 'es-ar': { - location_title: 'Ubicación', - location_description: 'Comparte tu ubicación', - location_address: 'Dirección' - }, - sw: { - location_title: 'Eneo', - location_description: 'Shiriki eneo lako', - location_address: 'Anwani' - }, - sv: { - location_title: 'Plats', - location_description: 'Dela din plats', - location_address: 'Adress' - }, - 'fr-ch': { - location_title: 'Emplacement', - location_description: 'Partagez votre emplacement', - location_address: 'Adresse' - }, - 'de-ch': { - location_title: 'Standort', - location_description: 'Teile deinen Standort', - location_address: 'Adresse' - }, - 'it-ch': { - location_title: 'Posizione', - location_description: 'Condividi la tua posizione', - location_address: 'Indirizzo' - }, - th: { - location_title: 'ตำแหน่ง', - location_description: 'แชร์ตำแหน่งของคุณ', - location_address: 'ที่อยู่' - }, - tr: { - location_title: 'Konum', - location_description: 'Konumunuzu paylaşın', - location_address: 'Adres' - }, - uk: { - location_title: 'Місцезнаходження', - location_description: 'Поділіться своїм місцезнаходженням', - location_address: 'Адреса' - }, - ur: { - location_title: 'مقام', - location_description: 'اپنا مقام بتائیں', - location_address: 'پتہ' - }, - vi: { - location_title: 'Vị trí', - location_description: 'Chia sẻ vị trí của bạn', - location_address: 'Địa chỉ' - } -}; diff --git a/resources/js/status.js b/resources/js/status.js index adc13ce4cb..6d2386ea09 100644 --- a/resources/js/status.js +++ b/resources/js/status.js @@ -208,26 +208,6 @@ function chooseContact(titleText, botDbKey, argumentIndex) { }]; } -function droppedPin() { - return ['dropped-pin']; -} - -function placesSearch() { - return ['places-search']; -} - -function currentLocationMap() { - return ['current-location-map']; -} - -function currentLocation() { - return ['current-location']; -} - -function placesNearby() { - return ['places-nearby']; -} - function separator() { return ['separator']; } @@ -293,11 +273,6 @@ var status = { chooseContact: chooseContact, subscribe: subscribe, dispatch: dispatch, - droppedPin: droppedPin, - placesSearch: placesSearch, - currentLocationMap: currentLocationMap, - currentLocation: currentLocation, - placesNearby: placesNearby, separator: separator }, showSuggestions: function (view) { diff --git a/scripts/setup b/scripts/setup index 64c5f783f6..aea2c7798d 100755 --- a/scripts/setup +++ b/scripts/setup @@ -39,9 +39,6 @@ echo && setup_header "Installing dependencies..." dependency_setup lein deps dependency_setup npm install -mapbox_path="$(repo_path)/node_modules/react-native-mapbox-gl/ios/Mapbox.framework" -dependency_setup "ln -sf '$mapbox_path' '$(repo_path)/ios'" - dependency_setup \ "ln -sf '$(repo_path)/node_modules/re-natal/index.js' '$(repo_path)/re-natal'" diff --git a/src/status_im/bots/constants.cljs b/src/status_im/bots/constants.cljs deleted file mode 100644 index ddb70a494e..0000000000 --- a/src/status_im/bots/constants.cljs +++ /dev/null @@ -1,5 +0,0 @@ -(ns status-im.bots.constants) - -(def mailman-bot "mailman") -(defn mailman-bot? [bot-name] - (= mailman-bot bot-name)) diff --git a/src/status_im/chat/models/commands.cljs b/src/status_im/chat/models/commands.cljs index 34505b76ff..aff9c57e1a 100644 --- a/src/status_im/chat/models/commands.cljs +++ b/src/status_im/chat/models/commands.cljs @@ -1,6 +1,5 @@ (ns status-im.chat.models.commands (:require [status-im.chat.constants :as chat-consts] - [status-im.bots.constants :as bots-constants] [clojure.string :as str] [taoensso.timbre :as log])) diff --git a/src/status_im/chat/models/input.cljs b/src/status_im/chat/models/input.cljs index d527d12933..4dbfe51c4f 100644 --- a/src/status_im/chat/models/input.cljs +++ b/src/status_im/chat/models/input.cljs @@ -1,6 +1,5 @@ (ns status-im.chat.models.input (:require [clojure.string :as str] - [status-im.bots.constants :as bots-constants] [status-im.ui.components.react :as rc] [status-im.native-module.core :as status] [status-im.chat.constants :as const] diff --git a/src/status_im/chat/specs.cljs b/src/status_im/chat/specs.cljs index b82b9e5fa0..f436915c18 100644 --- a/src/status_im/chat/specs.cljs +++ b/src/status_im/chat/specs.cljs @@ -17,4 +17,3 @@ (s/def :chat/messages (s/nilable map?)) ; messages indexed by message-id (s/def :chat/loaded-chats (s/nilable seq?)) (s/def :chat/bot-db (s/nilable map?)) -(s/def :chat/geolocation (s/nilable map?)) diff --git a/src/status_im/chat/views/api/geolocation/styles.cljs b/src/status_im/chat/views/api/geolocation/styles.cljs deleted file mode 100644 index c1eec87c51..0000000000 --- a/src/status_im/chat/views/api/geolocation/styles.cljs +++ /dev/null @@ -1,91 +0,0 @@ -(ns status-im.chat.views.api.geolocation.styles - (:require [status-im.ui.components.styles :as common])) - -(defn place-item-container [address] - {:height (if address 74 52) - :justify-content :center}) - -(def place-item-title-container - {:flex-direction :row - :align-items :center}) - -(defn place-item-circle-icon [pin-style] - (merge {:border-color common/color-light-blue - :border-width 3 - :border-radius 7 - :height 13 - :width 13} - pin-style)) - -(def black-pin - {:border-color common/color-black}) - -(def place-item-title - {:font-size 15 - :padding-left 9 - :padding-right 16 - :color common/color-black - :line-height 23}) - -(def place-item-address - {:font-size 15 - :padding-left 22 - :padding-right 16 - :color common/color-black - :line-height 23}) - -(def map-activity-indicator-container - {:align-items :center - :justify-content :center - :height 100}) - -(def map-view - {:height 100}) - -(def location-container - {:margin-top 11 - :margin-horizontal 16}) - -(def location-container-title - {:font-size 14 - :color common/color-gray4 - :letter-spacing -0.2}) - -(def location-container-title-count - (merge location-container-title - {:opacity 0.5})) - -(def separator - {:height 1 - :opacity 0.5 - :background-color "#c1c7cbb7"}) - -(def item-separator - (merge separator - {:margin-left 22})) - -(def pin-container - {:position :absolute - :top 0 - :right 0 - :bottom 0 - :left 0 - :justify-content :center - :align-items :center - :pointer-events :none}) - -(def pin-component - {:align-items :center}) - -(def pin-circle - {:border-color common/color-black - :background-color common/color-white - :border-width 3 - :border-radius 7 - :height 13 - :width 13}) - -(def pin-leg - {:height 7 - :width 2 - :background-color common/color-black}) \ No newline at end of file diff --git a/src/status_im/chat/views/api/geolocation/views.cljs b/src/status_im/chat/views/api/geolocation/views.cljs deleted file mode 100644 index a6f0eff358..0000000000 --- a/src/status_im/chat/views/api/geolocation/views.cljs +++ /dev/null @@ -1,179 +0,0 @@ -(ns status-im.chat.views.api.geolocation.views - (:require-macros [status-im.utils.views :refer [defview letsubs]] - [reagent.ratom :refer [reaction]]) - (:require [status-im.ui.components.react :refer [view image text touchable-highlight]] - [reagent.core :as r] - [goog.string :as gstr] - [status-im.utils.utils :refer [http-get]] - [status-im.utils.types :refer [json->clj]] - [status-im.chat.views.api.geolocation.styles :as st] - [status-im.ui.components.mapbox :refer [mapview]] - [re-frame.core :refer [dispatch subscribe]] - [status-im.i18n :refer [label]] - [status-im.ui.components.react :as components])) - -(def mapbox-api "https://api.mapbox.com/geocoding/v5/mapbox.places/") -(def access-token "pk.eyJ1Ijoic3RhdHVzaW0iLCJhIjoiY2oydmtnZjRrMDA3czMzcW9kemR4N2lxayJ9.Rz8L6xdHBjfO8cR3CDf3Cw") - -(defn get-places [coords cur-loc-geocoded & [poi?]] - (let [{:keys [latitude longitude]} coords] - (when (and latitude longitude) - (http-get (str mapbox-api longitude "," latitude - ".json?" (when poi? "types=poi&") "access_token=" access-token) - #(reset! cur-loc-geocoded (json->clj %)) - #(reset! cur-loc-geocoded nil)) - true))) - -(defn get-coord [{:keys [latitude longitude]}] - {:latitude (or latitude 0) - :longitude (or longitude 0)}) - -(defn place-item [{:keys [title address pin-style] [latitude longitude] :center}] - [touchable-highlight {:on-press #(do - (dispatch [:set-command-argument [0 - (str (or address title) - "&" latitude - "&" longitude) - false]]) - (dispatch [:send-seq-argument]))} - [view (st/place-item-container address) - [view st/place-item-title-container - [view (st/place-item-circle-icon pin-style)] - [text {:style st/place-item-title - :number-of-lines 1 - :font :medium} - title]] - (when address - [text {:style st/place-item-address - :number-of-lines 1} - address])]]) - -(defview current-location-map-view [] - (letsubs [geolocation [:get :geolocation] - command [:selected-chat-command]] - {:component-will-mount #(dispatch [:request-geolocation-update]) - :component-did-mount (fn [_] (js/setTimeout #(dispatch [:chat-input-focus :seq-input-ref]) 400))} - (let [coord (select-keys (:coords geolocation) [:latitude :longitude])] - [view - (if (not (empty? coord)) - [view - [mapview {:onTap #(do - (dispatch [:set-command-argument [0 "Dropped pin" false]]) - (dispatch [:set-chat-seq-arg-input-text "Dropped pin"]) - (dispatch [:chat-input-blur :seq-input-ref]) - (dispatch [:load-chat-parameter-box (:command command)])) - :initialCenterCoordinate (get-coord coord) - :showsUserLocation true - :initialZoomLevel 10 - :logoIsHidden true - :rotateEnabled false - :scrollEnabled false - :zoomEnabled false - :pitchEnabled false - :style st/map-view}]] - [view st/map-activity-indicator-container - [components/activity-indicator {:animating true}]])]))) - -(defn current-location-view [] - (let [geolocation (subscribe [:get :geolocation]) - cur-loc-geocoded (r/atom nil) - result (reaction (when @geolocation (get-places (:coords @geolocation) cur-loc-geocoded)))] - (r/create-class - {:component-will-mount #(dispatch [:request-geolocation-update]) - :display-name "current-location-view" - :reagent-render - (fn [] - (let [_ @result] - (when (and @cur-loc-geocoded (> (count (:features @cur-loc-geocoded)) 0)) - [view st/location-container - [text {:style st/location-container-title} - (label :t/your-current-location)] - (let [{:keys [place_name center] :as feature} (get-in @cur-loc-geocoded [:features 0])] - [place-item {:title (:text feature) :address place_name :center center}])])))}))) - -(defn places-nearby-view [] - (let [geolocation (subscribe [:get :geolocation]) - cur-loc-geocoded (r/atom nil) - result (reaction (when @geolocation (get-places (:coords @geolocation) cur-loc-geocoded true)))] - (r/create-class - {:component-will-mount #(dispatch [:request-geolocation-update]) - :render - (fn [] - (let [_ @result] - (when (and @cur-loc-geocoded (> (count (:features @cur-loc-geocoded)) 0)) - [view st/location-container - [text {:style st/location-container-title} - (label :t/places-nearby)] - (doall - (map (fn [{:keys [text place_name center] :as feature}] - ^{:key feature} - [view - [place-item {:title text :address place_name :center center}] - (when (not= feature (last (:features @cur-loc-geocoded))) - [view st/item-separator])]) - (:features @cur-loc-geocoded)))])))}))) - -(defn places-search [] - (let [seq-arg-input-text (subscribe [:chat :seq-argument-input-text]) - places (r/atom nil) - result (reaction (http-get (str mapbox-api @seq-arg-input-text - ".json?access_token=" access-token) - #(reset! places (json->clj %)) - #(reset! places nil)))] - (fn [] - (let [_ @result] - (when @places - (let [features-count (count (:features @places))] - [view st/location-container - [text {:style st/location-container-title} - (label :t/search-results) " " [text {:style st/location-container-title-count} features-count]] - (doall - (map (fn [{:keys [place_name center] :as feature}] - ^{:key feature} - [view - [place-item {:title place_name :center center}] - (when (not= feature (last (:features @places))) - [view st/item-separator])]) - (:features @places)))])))))) - -(defn dropped-pin [] - (let [geolocation @(subscribe [:get :geolocation]) - pin-location (r/atom nil) - pin-geolocation (r/atom nil) - pin-nearby (r/atom nil) - result (reaction (when @pin-location (get-places @pin-location pin-geolocation))) - result2 (reaction (when @pin-location (get-places @pin-location pin-nearby true)))] - (fn [] - (let [_ @result _ @result2 - coord (select-keys (:coords geolocation) [:latitude :longitude])] - [view - [view - [mapview {:initial-center-coordinate (get-coord coord) - :initialZoomLevel 10 - :onRegionDidChange #(reset! pin-location (js->clj % :keywordize-keys true)) - :logoIsHidden true - :style {:height 265}}] - [view st/pin-container - [view st/pin-component - [view st/pin-circle] - [view st/pin-leg]]]] - (when (and @pin-geolocation (> (count (:features @pin-geolocation)) 0)) - [view - [view st/location-container - [text {:style st/location-container-title} - (label :t/dropped-pin)] - (let [{:keys [place_name center] :as feature} (get-in @pin-geolocation [:features 0])] - [place-item {:title place_name :pin-style st/black-pin :center center}])] - [view st/separator]]) - (when (and @pin-nearby (> (count (:features @pin-nearby)) 0)) - [view st/location-container - [text {:style st/location-container-title} - (label :t/places-nearby)] - (doall - (map (fn [{:keys [text place_name center] :as feature}] - ^{:key feature} - [view - [place-item {:title text :address place_name :center center}] - (when (not= feature (last (:features @pin-nearby))) - [view st/item-separator])]) - (:features @pin-nearby)))])])))) diff --git a/src/status_im/chat/views/message/message.cljs b/src/status_im/chat/views/message/message.cljs index 8a193bb755..4f927632f6 100644 --- a/src/status_im/chat/views/message/message.cljs +++ b/src/status_im/chat/views/message/message.cljs @@ -277,7 +277,8 @@ (reagent/create-class {:component-did-update on-update - :display-name "message-container" + :display-name + "message-container" :reagent-render (fn [_ & children] @layout-height @@ -309,13 +310,8 @@ (re-frame/dispatch [:set-chat-ui-props {:show-emoji? false}]) (react/dismiss-keyboard!)) - :on-long-press #(cond (= content-type constants/text-content-type) - (list-selection/share content (i18n/label :t/message)) - (and (= content-type constants/content-type-command) - (= "location" (:content-command content))) - (let [address (get-in content [:params :address]) - [location lat long] (string/split address #"&")] - (list-selection/share-or-open-map location lat long)))} + :on-long-press #(when (= content-type constants/text-content-type) + (list-selection/share content (i18n/label :t/message)))} [react/view (let [incoming-group (and group-chat (not outgoing))] [message-content message-body (merge message diff --git a/src/status_im/commands/utils.cljs b/src/status_im/commands/utils.cljs index 00effcb2ab..5e616e30a7 100644 --- a/src/status_im/commands/utils.cljs +++ b/src/status_im/commands/utils.cljs @@ -7,7 +7,6 @@ [status-im.chat.views.api.choose-contact :as choose-contact] [status-im.ui.components.qr-code-viewer.views :as qr-code-viewer] [status-im.ui.components.chat-preview :as chat-preview] - [status-im.chat.views.api.geolocation.views :as geolocation] [status-im.utils.handlers :refer [register-handler]] [taoensso.timbre :as log])) @@ -33,12 +32,7 @@ :activity-indicator components/activity-indicator :validation-message chat-validation-messages/validation-message :choose-contact choose-contact/choose-contact-view - :separator parameter-box-separator - :current-location-map geolocation/current-location-map-view - :current-location geolocation/current-location-view - :places-nearby geolocation/places-nearby-view - :places-search geolocation/places-search - :dropped-pin geolocation/dropped-pin}) + :separator parameter-box-separator}) (defn get-element [n] (elements (keyword (.toLowerCase n)))) diff --git a/src/status_im/data_store/realm/schemas/account/v21/core.cljs b/src/status_im/data_store/realm/schemas/account/v21/core.cljs index 01c7f8c987..af54583149 100644 --- a/src/status_im/data_store/realm/schemas/account/v21/core.cljs +++ b/src/status_im/data_store/realm/schemas/account/v21/core.cljs @@ -13,7 +13,8 @@ [status-im.data-store.realm.schemas.account.v8.local-storage :as local-storage] [status-im.data-store.realm.schemas.account.v21.browser :as browser] [taoensso.timbre :as log] - [cljs.reader :as reader])) + [cljs.reader :as reader] + [clojure.string :as str])) (def schema [chat/schema chat-contact/schema @@ -37,6 +38,17 @@ (log/debug "v21 Removing contact " (pr-str contact)) (.delete new-realm contact))) +(defn remove-location-messages! [old-realm new-realm] + (let [messages (.objects new-realm "message")] + (dotimes [i (.-length messages)] + (let [message (aget messages i) + content (aget message "content") + type (aget message "content-type")] + (when (and (= type "command") + (> (str/index-of content "command=location") -1)) + (aset message "show?" false)))))) + (defn migration [old-realm new-realm] (log/debug "migrating v21 account database: " old-realm new-realm) - (remove-contact! new-realm "browse")) \ No newline at end of file + (remove-contact! new-realm "browse") + (remove-location-messages! old-realm new-realm)) \ No newline at end of file diff --git a/src/status_im/i18n.cljs b/src/status_im/i18n.cljs index 4df3c580a1..6794c909bf 100644 --- a/src/status_im/i18n.cljs +++ b/src/status_im/i18n.cljs @@ -163,7 +163,7 @@ :phone-national :amount :open :close-app-title :members-active :chat-name :phew-here-is-your-passphrase :public-group-topic :debug-enabled :chat-settings :offline :update-status :invited :chat-send-eth :address - :new-public-group-chat :datetime-hour :dropped-pin :wallet-settings + :new-public-group-chat :datetime-hour :wallet-settings :datetime-ago-format :close-app-button :block :camera-access-error :wallet-invalid-address :address-explication :remove :transactions-delete-content :transactions-unsigned-empty @@ -178,10 +178,9 @@ :not-applicable :move-to-internal-failure-message :active-online :password :status-seen-by-everyone :edit-group :not-specified :delete-group :send-request :paste-json :browsing-title - :wallet-add-asset :reorder-groups :transactions-history-empty - :sharing-copy-to-clipboard-coordinates :discover :wallet-error + :wallet-add-asset :reorder-groups :transactions-history-empty :discover :browsing-cancel :faucet-success :intro-status :name :gas-price - :phone-number-required :view-transaction-details + :phone-number-required :view-transaction-details :wallet-error :validation-amount-is-too-precise :copy-transaction-hash :unknown-address :received-invitation :show-qr :edit-network-config :connect :choose-from-contacts :edit :wallet-address-from-clipboard @@ -203,7 +202,7 @@ :wallet-send :mute-notifications :invalid-phone :scan-qr :contact-s :unsigned-transaction-expired :status-sending :gas-used :transactions-filter-type :next :recent :confirmation-code - :open-on-etherscan :share :status :from :your-current-location + :open-on-etherscan :share :status :from :wrong-password :search-chats :transactions-sign-later :in-contacts :transactions-sign :sharing-share :type-a-message :type-a-command :usd-currency :existing-networks :node-unavailable :url :shake-your-phone @@ -214,15 +213,13 @@ :delete-contact-confirmation :datetime-today :add-a-status :web-view-error :notifications-title :error :transactions-sign-transaction :edit-contacts :more :cancel :no-statuses-found :can-not-add-yourself - :transaction-description :add-to-contacts :available :open-map + :transaction-description :add-to-contacts :available :paste-json-as-text :You :main-wallet :process-json :testnet-text :transactions :transactions-unsigned :members :intro-message1 :public-chat-user-count :eth :transactions-history :not-implemented - :new-contact :datetime-second :search-results :status-failed :is-typing - :sharing-copy-to-clipboard-address :recover :wallet-total-value - :places-nearby :suggestions-commands :nonce :new-network - :contact-already-added :datetime-minute :location - :browsing-open-in-web-browser :delete-group-prompt + :new-contact :datetime-second :status-failed :is-typing :recover + :suggestions-commands :nonce :new-network :contact-already-added :datetime-minute + :browsing-open-in-web-browser :delete-group-prompt :wallet-total-value :wallet-insufficient-funds :edit-profile :active-unknown :testfairy-message :search-tags :transaction-failed :public-key :error-processing-json :status-seen :transactions-filter-tokens :status-delivered :profile diff --git a/src/status_im/translations/de.cljs b/src/status_im/translations/de.cljs index c85637df3b..f20efbcfac 100644 --- a/src/status_im/translations/de.cljs +++ b/src/status_im/translations/de.cljs @@ -193,16 +193,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Dein aktueller Standort" - :places-nearby "Standorte in der Nähe" - :search-results "Ergebnisse durchsuchen" - :dropped-pin "Pin gesetzt" - :location "Standort" - :open-map "Öffne Karte" - :sharing-copy-to-clipboard-address "Adresse kopieren" - :sharing-copy-to-clipboard-coordinates "Koordinaten kopieren" - ;;new-group :new-group "Neue Gruppe" :reorder-groups "Gruppen neu ordnen" diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 2e5f16a4f2..90c5624672 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -204,16 +204,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Your current location" - :places-nearby "Places nearby" - :search-results "Search results" - :dropped-pin "Dropped pin" - :location "Location" - :open-map "Open Map" - :sharing-copy-to-clipboard-address "Copy the Address" - :sharing-copy-to-clipboard-coordinates "Copy coordinates" - ;;new-group :new-group "New group" :reorder-groups "Reorder groups" diff --git a/src/status_im/translations/es.cljs b/src/status_im/translations/es.cljs index c5661f26d5..1995d2c901 100644 --- a/src/status_im/translations/es.cljs +++ b/src/status_im/translations/es.cljs @@ -191,16 +191,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Tu ubicación actual" - :places-nearby "Lugares cercanos" - :search-results "Buscar resultados" - :dropped-pin "Marcador puesto" - :location "Ubicación" - :open-map "Abrir Mapa" - :sharing-copy-to-clipboard-address "Copiar dirección" - :sharing-copy-to-clipboard-coordinates "Copiar coordenadas" - ;;new-group :new-group "Nuevo grupo" :reorder-groups "Reordenar grupos" diff --git a/src/status_im/translations/fr.cljs b/src/status_im/translations/fr.cljs index 66d47200b6..a5216dbdd9 100644 --- a/src/status_im/translations/fr.cljs +++ b/src/status_im/translations/fr.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Votre localisation actuelle" - :places-nearby "Endroits proches" - :search-results "Résultats de recherche" - :dropped-pin "Repère placé" - :location "Localisation" - :open-map "Ouvrir la carte" - :sharing-copy-to-clipboard-address "Copier l'adresse" - :sharing-copy-to-clipboard-coordinates "Copier les coordonnées" - ;;new-group :new-group "Nouveau groupe" :reorder-groups "Réarranger les groupes" diff --git a/src/status_im/translations/it.cljs b/src/status_im/translations/it.cljs index 424d737ddd..bf8dc6ad2a 100644 --- a/src/status_im/translations/it.cljs +++ b/src/status_im/translations/it.cljs @@ -191,16 +191,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "La tua posizione corrente" - :places-nearby "Posti vicini" - :search-results "Cerca risultati" - :dropped-pin "Pin posizionato" - :location "Posizione" - :open-map "Apri Mappa" - :sharing-copy-to-clipboard-address "Copia l'Indirizzo" - :sharing-copy-to-clipboard-coordinates "Copia coordinate" - ;;new-group :new-group "Nuovo gruppo" :reorder-groups "Riordina gruppi" diff --git a/src/status_im/translations/ja.cljs b/src/status_im/translations/ja.cljs index f55c1094fc..1da85f969d 100644 --- a/src/status_im/translations/ja.cljs +++ b/src/status_im/translations/ja.cljs @@ -191,16 +191,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "あなたの現在の場所" - :places-nearby "近くの場所" - :search-results "検索結果" - :dropped-pin "ドロップされたピン" - :location "場所" - :open-map "地図を開く" - :sharing-copy-to-clipboard-address "住所をコピーする" - :sharing-copy-to-clipboard-coordinates "座標をコピーする" - ;;new-group :new-group "新しいグループ" :reorder-groups "グループを並び替え" diff --git a/src/status_im/translations/ko.cljs b/src/status_im/translations/ko.cljs index ada3aaacf8..88e24d88e6 100644 --- a/src/status_im/translations/ko.cljs +++ b/src/status_im/translations/ko.cljs @@ -191,16 +191,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "현재 위치" - :places-nearby "주변 장소" - :search-results "검색 결과" - :dropped-pin "핀한 곳" - :location "위치" - :open-map "지도 열기" - :sharing-copy-to-clipboard-address "주소 복사" - :sharing-copy-to-clipboard-coordinates "좌표 복사" - ;;new-group :new-group "새 그룹" :reorder-groups "그룹 재정렬" diff --git a/src/status_im/translations/lt.cljs b/src/status_im/translations/lt.cljs index 90efc70a7b..3cdbf985fa 100644 --- a/src/status_im/translations/lt.cljs +++ b/src/status_im/translations/lt.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Jūsų dabartinė vieta" - :places-nearby "Netolimos vietos" - :search-results "Paieškos rezultatai" - :dropped-pin "Lokacijos žymeklis" - :location "Lokacija" - :open-map "Atverti žemėlapį" - :sharing-copy-to-clipboard-address "Kopijuoti adresą" - :sharing-copy-to-clipboard-coordinates "Kopijuoti koordinates" - ;;new-group :new-group "Nauja grupė" :reorder-groups "Rūšiuoti grupes" diff --git a/src/status_im/translations/ms.cljs b/src/status_im/translations/ms.cljs index 0477b4a4c5..5365fee935 100644 --- a/src/status_im/translations/ms.cljs +++ b/src/status_im/translations/ms.cljs @@ -172,16 +172,6 @@ ;commands :chat-send-eth "{{amount}} ETH" - ;location command - :your-current-location "Lokasi terkini anda" - :places-nearby "Tempat berhampiran" - :search-results "Hasil carian" - :dropped-pin "Pin dilepaskan" - :location "Lokasi" - :open-map "Buka peta" - :sharing-copy-to-clipboard-address "Salin alamat" - :sharing-copy-to-clipboard-coordinates "Salin koordinat" - ;new-group :new-group "Kumpulan baru" :reorder-groups "Susun kumpulan" diff --git a/src/status_im/translations/nb.cljs b/src/status_im/translations/nb.cljs index f7ccdf6ed6..538090e4d3 100644 --- a/src/status_im/translations/nb.cljs +++ b/src/status_im/translations/nb.cljs @@ -178,16 +178,6 @@ ;commands :chat-send-eth "{{amount}} ETH" - ;location command - :your-current-location "Din nåværende posisjon" - :places-nearby "Steder i nærheten" - :search-results "Søkeresultat" - :dropped-pin "Slipp nål" - :location "Posisjon" - :open-map "Åpne kart" - :sharing-copy-to-clipboard-address "Kopier adressen" - :sharing-copy-to-clipboard-coordinates "Kopier koordinater" - ;new-group :new-group "Ny gruppe" :reorder-groups "Organiser grupper" diff --git a/src/status_im/translations/ru.cljs b/src/status_im/translations/ru.cljs index c8dbbf9736..5e5628aa6f 100644 --- a/src/status_im/translations/ru.cljs +++ b/src/status_im/translations/ru.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Ваше текущее местоположение" - :places-nearby "Места поблизости" - :search-results "Результаты поиска" - :dropped-pin "Выбранное местоположение" - :location "Местоположение" - :open-map "Открыть Карту" - :sharing-copy-to-clipboard-address "Скопировать адрес" - :sharing-copy-to-clipboard-coordinates "Скопировать координаты" - ;;new-group :new-group "Новая группа" :reorder-groups "Упорядочить группы" diff --git a/src/status_im/translations/sr_rs_cyrl.cljs b/src/status_im/translations/sr_rs_cyrl.cljs index 202d53542e..6a9d84a4e3 100644 --- a/src/status_im/translations/sr_rs_cyrl.cljs +++ b/src/status_im/translations/sr_rs_cyrl.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Ваша тренутна локација" - :places-nearby "Места у близини" - :search-results "Претражи резултате" - :dropped-pin "Баци иглу" - :location "Локација" - :open-map "Отвори мапу" - :sharing-copy-to-clipboard-address "Копирај адресу" - :sharing-copy-to-clipboard-coordinates "Копирај координате" - ;;new-group :new-group "Нова група" :reorder-groups "Промени распоред група" diff --git a/src/status_im/translations/sv.cljs b/src/status_im/translations/sv.cljs index 46e6dbabac..d229d74426 100644 --- a/src/status_im/translations/sv.cljs +++ b/src/status_im/translations/sv.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Din nuvarande plats" - :places-nearby "Närliggande platser" - :search-results "Sökresultat" - :dropped-pin "Droppade nål" - :location "Plats" - :open-map "Öppna kartan" - :sharing-copy-to-clipboard-address "Kopera addressen" - :sharing-copy-to-clipboard-coordinates "Kopiera koordinaterna" - ;;new-group :new-group "Ny grupp" :reorder-groups "Ordna grupper" diff --git a/src/status_im/translations/uk.cljs b/src/status_im/translations/uk.cljs index ade52a2103..01ad4aa3e0 100644 --- a/src/status_im/translations/uk.cljs +++ b/src/status_im/translations/uk.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "Ваше поточне місцезнаходження" - :places-nearby "Місця поблизу" - :search-results "Результати пошуку" - :dropped-pin "Вибране місцезнаходження" - :location "Місцезнаходження" - :open-map "Відкрити Карту" - :sharing-copy-to-clipboard-address "Скопіювати адресу" - :sharing-copy-to-clipboard-coordinates "Скопіювати координати" - ;;new-group :new-group "Нова група" :reorder-groups "Впорядкувати групи" diff --git a/src/status_im/translations/zh_hans.cljs b/src/status_im/translations/zh_hans.cljs index d770711352..f6e9d867c8 100644 --- a/src/status_im/translations/zh_hans.cljs +++ b/src/status_im/translations/zh_hans.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "你的当前位置" - :places-nearby "附近的位置" - :search-results "查询结果" - :dropped-pin "放置的标记" - :location "位置" - :open-map "打开地图" - :sharing-copy-to-clipboard-address "复制地址" - :sharing-copy-to-clipboard-coordinates "复制坐标" - ;;new-group :new-group "新增群组" :reorder-groups "重新排序群组" diff --git a/src/status_im/translations/zh_hant.cljs b/src/status_im/translations/zh_hant.cljs index 3e67d7089f..81fd97ec96 100644 --- a/src/status_im/translations/zh_hant.cljs +++ b/src/status_im/translations/zh_hant.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "你的當前位置" - :places-nearby "附近的位置" - :search-results "查詢結果" - :dropped-pin "放置的標記" - :location "位置" - :open-map "打開地圖" - :sharing-copy-to-clipboard-address "複製地址" - :sharing-copy-to-clipboard-coordinates "複製座標" - ;;new-group :new-group "新增羣組" :reorder-groups "重新排序羣組" diff --git a/src/status_im/translations/zh_hant_hk.cljs b/src/status_im/translations/zh_hant_hk.cljs index 09ab7fcaa1..9570e6113c 100644 --- a/src/status_im/translations/zh_hant_hk.cljs +++ b/src/status_im/translations/zh_hant_hk.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "你的當前位置" - :places-nearby "附近的位置" - :search-results "查詢結果" - :dropped-pin "放置的標記" - :location "位置" - :open-map "打開地圖" - :sharing-copy-to-clipboard-address "複製地址" - :sharing-copy-to-clipboard-coordinates "複製座標" - ;;new-group :new-group "新增羣組" :reorder-groups "重新排序羣組" diff --git a/src/status_im/translations/zh_hant_sg.cljs b/src/status_im/translations/zh_hant_sg.cljs index c3c1e3b543..cab84858ba 100644 --- a/src/status_im/translations/zh_hant_sg.cljs +++ b/src/status_im/translations/zh_hant_sg.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "你的當前位置" - :places-nearby "附近的位置" - :search-results "查詢結果" - :dropped-pin "放置的標記" - :location "位置" - :open-map "開啟地圖" - :sharing-copy-to-clipboard-address "複製地址" - :sharing-copy-to-clipboard-coordinates "複製座標" - ;;new-group :new-group "新增群組" :reorder-groups "重新排序群組" diff --git a/src/status_im/translations/zh_hant_tw.cljs b/src/status_im/translations/zh_hant_tw.cljs index f42f57e624..8bc2419606 100644 --- a/src/status_im/translations/zh_hant_tw.cljs +++ b/src/status_im/translations/zh_hant_tw.cljs @@ -192,16 +192,6 @@ ;;commands :chat-send-eth "{{amount}} ETH" - ;;location command - :your-current-location "你的當前位置" - :places-nearby "附近的位置" - :search-results "查詢結果" - :dropped-pin "放置的標記" - :location "位置" - :open-map "開啟地圖" - :sharing-copy-to-clipboard-address "複製地址" - :sharing-copy-to-clipboard-coordinates "複製座標" - ;;new-group :new-group "新增群組" :reorder-groups "重新排序群組" diff --git a/src/status_im/ui/components/list_selection.cljs b/src/status_im/ui/components/list_selection.cljs index 48af242262..43b045404c 100644 --- a/src/status_im/ui/components/list_selection.cljs +++ b/src/status_im/ui/components/list_selection.cljs @@ -39,19 +39,3 @@ 1 (.openURL linking link) :default)) :cancel-text (label :t/browsing-cancel)}))) - -(defn share-or-open-map [address lat lng] - (let [list-selection-fn (:list-selection-fn platform-specific)] - (list-selection-fn {:title (label :t/location) - :options [{:text (label :t/sharing-copy-to-clipboard-address)} - {:text (label :t/sharing-copy-to-clipboard-coordinates)} - {:text (label :t/open-map)}] - :callback (fn [index] - (case index - 0 (copy-to-clipboard address) - 1 (copy-to-clipboard (str lng "," lat)) - 2 (.openURL linking (if ios? - (str "http://maps.apple.com/?ll=" lng "," lat) - (str "geo:" lng "," lat))) - :default)) - :cancel-text (label :t/cancel)}))) diff --git a/src/status_im/ui/components/mapbox.cljs b/src/status_im/ui/components/mapbox.cljs deleted file mode 100644 index 012333c722..0000000000 --- a/src/status_im/ui/components/mapbox.cljs +++ /dev/null @@ -1,22 +0,0 @@ -(ns status-im.ui.components.mapbox - (:require [reagent.core :as r] - [status-im.ui.components.styles :as common] - [status-im.i18n :refer [label]] - [status-im.utils.platform :refer [platform-specific ios?]] - [re-frame.core :refer [dispatch]] - [status-im.ui.components.react :refer [view touchable-highlight text]] - [status-im.react-native.js-dependencies :as rn-dependencies])) - -(defn get-property [name] - (aget rn-dependencies/mapbox-gl name)) - -(defn adapt-class [class] - (when class - (r/adapt-react-class class))) - -(defn get-class [name] - (adapt-class (get-property name))) - -(.setAccessToken rn-dependencies/mapbox-gl "pk.eyJ1Ijoic3RhdHVzaW0iLCJhIjoiY2oydmtnZjRrMDA3czMzcW9kemR4N2lxayJ9.Rz8L6xdHBjfO8cR3CDf3Cw") - -(def mapview (get-class "MapView")) diff --git a/src/status_im/ui/components/permissions.cljs b/src/status_im/ui/components/permissions.cljs index d7f9f3c40a..6f113e101e 100644 --- a/src/status_im/ui/components/permissions.cljs +++ b/src/status_im/ui/components/permissions.cljs @@ -10,8 +10,7 @@ :write-external-storage "android.permission.WRITE_EXTERNAL_STORAGE" :read-contacts "android.permission.READ_CONTACTS" :camera "android.permission.CAMERA" - :receive-sms "android.permission.RECEIVE_SMS" - :geolocation "android.permission.ACCESS_FINE_LOCATION"}) + :receive-sms "android.permission.RECEIVE_SMS"}) (defn all-granted? [permissions] (let [permission-vals (distinct (vals permissions))] diff --git a/src/status_im/ui/components/react.cljs b/src/status_im/ui/components/react.cljs index 2ff7c7ac82..82762df294 100644 --- a/src/status_im/ui/components/react.cljs +++ b/src/status_im/ui/components/react.cljs @@ -33,8 +33,6 @@ (def app-registry (get-react-property "AppRegistry")) (def app-state (get-react-property "AppState")) (def net-info (get-react-property "NetInfo")) -(def geolocation (when (exists? js/window) - js/navigator.geolocation.)) (def view (get-class "View")) (def status-bar (get-class "StatusBar")) diff --git a/src/status_im/ui/screens/contacts/subs.cljs b/src/status_im/ui/screens/contacts/subs.cljs index 5cbd82a733..18eed4887e 100644 --- a/src/status_im/ui/screens/contacts/subs.cljs +++ b/src/status_im/ui/screens/contacts/subs.cljs @@ -1,8 +1,7 @@ (ns status-im.ui.screens.contacts.subs (:require [re-frame.core :refer [reg-sub subscribe]] [status-im.utils.identicon :refer [identicon]] - [clojure.string :as str] - [status-im.bots.constants :as bots-constants])) + [clojure.string :as str])) (reg-sub :current-contact (fn [db [_ k]] diff --git a/src/status_im/ui/screens/db.cljs b/src/status_im/ui/screens/db.cljs index a139c48b88..210914463a 100644 --- a/src/status_im/ui/screens/db.cljs +++ b/src/status_im/ui/screens/db.cljs @@ -179,7 +179,6 @@ :chat/messages :chat/loaded-chats :chat/bot-db - :chat/geolocation :commands/access-scope->commands-responses :discoveries/discoveries :discoveries/discover-search-tags diff --git a/src/status_im/ui/screens/events.cljs b/src/status_im/ui/screens/events.cljs index dddde9fe83..614622b256 100644 --- a/src/status_im/ui/screens/events.cljs +++ b/src/status_im/ui/screens/events.cljs @@ -371,8 +371,6 @@ "node.started" (re-frame/dispatch [:status-node-started]) "node.stopped" (re-frame/dispatch [:status-node-stopped]) "module.initialized" (re-frame/dispatch [:status-module-initialized]) - "request_geo_permissions" (re-frame/dispatch [:request-permissions [:geolocation] - #(re-frame/dispatch [:webview-geo-permissions-granted])]) "jail.signal" (handle-jail-signal event) (log/debug "Event " type " not handled"))))) @@ -399,34 +397,7 @@ ;; TODO(rasom): let's not remove this handler, it will be used for ;; pausing node on entering background on android - (handlers/register-handler-fx :request-permissions (fn [_ [_ permissions then else]] {::request-permissions-fx [permissions then else]})) - -(handlers/register-handler-fx - :request-geolocation-update - (fn [_ _] - {:dispatch [:request-permissions [:geolocation] - (fn [] - (let [watch-id (atom nil)] - (.getCurrentPosition - react/geolocation - #(re-frame/dispatch [:update-geolocation (js->clj % :keywordize-keys true)]) - #(re-frame/dispatch [:update-geolocation (js->clj % :keywordize-keys true)]) - (clj->js {:enableHighAccuracy true :timeout 20000 :maximumAge 1000})) - (when platform/android? - (reset! watch-id - (.watchPosition - react/geolocation - #(do - (.clearWatch - react/geolocation - @watch-id) - (re-frame/dispatch [:update-geolocation (js->clj % :keywordize-keys true)])))))))]})) - -(handlers/register-handler-db - :update-geolocation - (fn [db [_ geolocation]] - (assoc db :geolocation geolocation))) diff --git a/src/status_im/utils/js_resources.cljs b/src/status_im/utils/js_resources.cljs index b8551fab79..75aee5b951 100644 --- a/src/status_im/utils/js_resources.cljs +++ b/src/status_im/utils/js_resources.cljs @@ -15,14 +15,11 @@ (def console-js (slurp-bot :console "web3_metadata.js")) -(def mailman-js (slurp-bot :mailman)) - (def demo-bot-js (slurp-bot :demo_bot)) (def resources {:transactor-bot transactor-js :console-bot console-js - :mailman-bot mailman-js :demo-bot demo-bot-js}) (defn get-resource [url] diff --git a/test/cljs/status_im/react_native/js_dependencies.cljs b/test/cljs/status_im/react_native/js_dependencies.cljs index b1466effff..18df304ef5 100644 --- a/test/cljs/status_im/react_native/js_dependencies.cljs +++ b/test/cljs/status_im/react_native/js_dependencies.cljs @@ -16,7 +16,6 @@ (def image-resizer #js {}) (def instabug #js {}) (def linear-gradient #js {}) -(def mapbox-gl #js {:setAccessToken (fn [])}) (def nfc #js {}) (def orientation #js {}) (def popup-menu #js {})