Skip to content

Commit

Permalink
Merge pull request #5 from Zelusik/develop
Browse files Browse the repository at this point in the history
v2.0.2
  • Loading branch information
Limgabi authored Dec 30, 2023
2 parents aa91beb + bbf4778 commit 87f41a8
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 99 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ android {
applicationId "com.bobplace.eatery"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 11
versionName "2.0.1"
versionCode 13
versionName "2.0.2"
}
signingConfigs {
debug {
Expand Down
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
Expand Down
21 changes: 11 additions & 10 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ PODS:
- React-jsinspector (0.72.3)
- React-logger (0.72.3):
- glog
- react-native-safe-area-context (4.7.2):
- react-native-safe-area-context (4.7.4):
- React-Core
- react-native-webview (13.3.1):
- React-Core
Expand Down Expand Up @@ -491,9 +491,10 @@ PODS:
- React-perflogger (= 0.72.3)
- RNCMaskedView (0.1.11):
- React
- RNGestureHandler (2.12.1):
- RNGestureHandler (2.13.4):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNReanimated (3.4.2):
- RNReanimated (3.5.4):
- DoubleConversion
- FBLazyVector
- glog
Expand Down Expand Up @@ -522,9 +523,9 @@ PODS:
- React-RCTText
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.25.0):
- RNScreens (3.27.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- React-RCTImage
- SocketRocket (0.6.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
Expand Down Expand Up @@ -745,7 +746,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 59d1eb03af7d30b7d66589c410f13151271e8006
React-jsinspector: b511447170f561157547bc0bef3f169663860be7
React-logger: c5b527272d5f22eaa09bb3c3a690fee8f237ae95
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
react-native-safe-area-context: 2cd91d532de12acdb0a9cbc8d43ac72a8e4c897c
react-native-webview: c2b70afb1d910cdd8810375aecc6c2894e2ba061
React-NativeModulesApple: c57f3efe0df288a6532b726ad2d0322a9bf38472
React-perflogger: 6bd153e776e6beed54c56b0847e1220a3ff92ba5
Expand All @@ -765,13 +766,13 @@ SPEC CHECKSUMS:
React-utils: bcb57da67eec2711f8b353f6e3d33bd8e4b2efa3
ReactCommon: 3ccb8fb14e6b3277e38c73b0ff5e4a1b8db017a9
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
RNGestureHandler: c0d04458598fcb26052494ae23dda8f8f5162b13
RNReanimated: 726395a2fa2f04cea340274ba57a4e659bc0d9c1
RNScreens: 85d3880b52d34db7b8eeebe2f1a0e807c05e69fa
RNGestureHandler: 6e46dde1f87e5f018a54fe5d40cd0e0b942b49ee
RNReanimated: ab2e96c6d5591c3dfbb38a464f54c8d17fb34a87
RNScreens: 3c2d122f5e08c192e254c510b212306da97d2581
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 9a8e31591e3f68cfb0d3c43b955f68d06c423e61

COCOAPODS: 1.12.1
COCOAPODS: 1.14.3
4 changes: 2 additions & 2 deletions ios/ZelusikClientWebview.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -529,7 +529,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 0 additions & 2 deletions ios/ZelusikClientWebview/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Expand Down
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native": "^6.1.9",
"@react-navigation/stack": "^6.3.17",
"react": "18.2.0",
"react-native": "0.72.3",
"react-native-dotenv": "^3.4.9",
"react-native-gesture-handler": "^2.12.1",
"react-native-reanimated": "^3.4.2",
"react-native-safe-area-context": "^4.7.2",
"react-native-screens": "^3.25.0",
"react-native-gesture-handler": "^2.13.4",
"react-native-reanimated": "^3.5.4",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-webview": "^13.3.1"
},
"devDependencies": {
Expand Down
37 changes: 17 additions & 20 deletions src/components/WebviewContent.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
import React, { useRef, useState, useEffect } from "react";
import { BackHandler } from "react-native";
import WebView from "react-native-webview";
import { WEBVIEW_URL } from "@env";
import React, { useRef, useState, useEffect } from 'react';
import { BackHandler } from 'react-native';
import WebView from 'react-native-webview';
import { WEBVIEW_URL } from '@env';

const WebViewContent = ({ handleClose }: any) => {
const webviewRef = useRef<any>();
const [isCanGoBack, setIsCanGoBack] = useState(false);

useEffect(() => {
const backHandler = BackHandler.addEventListener(
"hardwareBackPress",
() => {
if (isCanGoBack) {
webviewRef.current.goBack();
} else {
handleClose();
}
return true;
const backHandler = BackHandler.addEventListener('hardwareBackPress', () => {
if (isCanGoBack) {
webviewRef.current.goBack();
} else {
handleClose();
}
);
return true;
});
return () => backHandler.remove();
}, [isCanGoBack, handleClose]);

Expand All @@ -33,14 +30,14 @@ const WebViewContent = ({ handleClose }: any) => {
ref={webviewRef}
source={{ uri: WEBVIEW_URL }}
style={{
backgroundColor: "#ffffff",
backgroundColor: '#ffffff',
}}
pullToRefreshEnabled={true}
startInLoadingState={true}
allowsBackForwardNavigationGestures={true}
mixedContentMode={"compatibility"}
originWhitelist={["https://*", "http://*"]}
overScrollMode={"never"}
mixedContentMode={'compatibility'}
originWhitelist={['https://*', 'http://*']}
overScrollMode={'never'}
injectedJavaScript={`
(function() {
function wrap(fn) {
Expand All @@ -62,8 +59,8 @@ const WebViewContent = ({ handleClose }: any) => {
// Webview2RN
onMessage={(event) => {
const url = event.nativeEvent.data;
console.log(url);
setIsCanGoBack(url !== WEBVIEW_URL + "/");
// console.log(url);
setIsCanGoBack(url !== WEBVIEW_URL + '/');
}}
/>
);
Expand Down
Loading

0 comments on commit 87f41a8

Please sign in to comment.