Skip to content

Commit d358d58

Browse files
authored
feat: Audio recorder (#889)
1 parent fea8cf8 commit d358d58

File tree

19 files changed

+609
-109
lines changed

19 files changed

+609
-109
lines changed

app.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default ({ config }: ConfigContext): ExpoConfig => {
44
return {
55
name: 'Chatwoot',
66
slug: process.env.EXPO_PUBLIC_APP_SLUG || 'chatwoot-mobile',
7-
version: '4.0.0',
7+
version: '4.0.6',
88
orientation: 'portrait',
99
icon: './assets/icon.png',
1010
userInterfaceStyle: 'light',
@@ -93,15 +93,26 @@ export default ({ config }: ConfigContext): ExpoConfig => {
9393
{
9494
// https://github.com/invertase/notifee/issues/808#issuecomment-2175934609
9595
android: {
96+
minSdkVersion: 24,
9697
compileSdkVersion: 34,
9798
targetSdkVersion: 34,
9899
extraMavenRepos: ['$rootDir/../../../node_modules/@notifee/react-native/android/libs'],
100+
enableProguardInReleaseBuilds: true,
99101
},
100102
ios: {
101103
useFrameworks: 'static',
102104
},
103105
},
104106
],
107+
[
108+
'@config-plugins/ffmpeg-kit-react-native',
109+
{
110+
package: 'min',
111+
ios: {
112+
package: 'audio',
113+
},
114+
},
115+
],
105116
],
106117
androidNavigationBar: {
107118
backgroundColor: '#ffffff',

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chatwoot/mobile-app",
3-
"version": "4.0.0",
3+
"version": "4.0.6",
44
"main": "expo/AppEntry.js",
55
"scripts": {
66
"start": "expo start",
@@ -32,6 +32,7 @@
3232
"@chatwoot/markdown-to-txt": "^2.0.4",
3333
"@chatwoot/react-native-widget": "^0.0.21",
3434
"@chatwoot/utils": "^0.0.25",
35+
"@config-plugins/ffmpeg-kit-react-native": "^9.0.0",
3536
"@gorhom/bottom-sheet": "^4.6.3",
3637
"@kesha-antonov/react-native-action-cable": "^1.1.4",
3738
"@notifee/react-native": "^9.1.1",
@@ -66,6 +67,7 @@
6667
"expo-status-bar": "~1.12.1",
6768
"expo-system-ui": "~3.0.7",
6869
"expo-web-browser": "~13.0.3",
70+
"ffmpeg-kit-react-native": "^6.0.2",
6971
"i18n-js": "^3.8.0",
7072
"lodash": "^4.17.21",
7173
"react": "18.2.0",
@@ -77,6 +79,7 @@
7779
"react-native-device-info": "^11.1.0",
7880
"react-native-document-picker": "^9.3.1",
7981
"react-native-file-viewer": "^2.1.5",
82+
"react-native-fs": "^2.20.0",
8083
"react-native-gesture-handler": "^2.17.1",
8184
"react-native-image-picker": "^7.1.2",
8285
"react-native-ios-context-menu": "^3.1.0",

pnpm-lock.yaml

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import React, { useEffect } from 'react';
22
import { Provider } from 'react-redux';
3-
import { Alert, BackHandler, LogBox } from 'react-native';
3+
import { Alert, BackHandler } from 'react-native';
44
import { PersistGate } from 'redux-persist/integration/react';
55
import { store, persistor } from './store';
66
import { AppNavigator } from '@/navigation';
77

88
import i18n from '@/i18n';
99

10-
// TODO: Please fix this
11-
LogBox.ignoreLogs(['Require cycle:']);
12-
1310
const Chatwoot = () => {
1411
useEffect(() => {
1512
BackHandler.addEventListener('hardwareBackPress', handleBackButtonClick);

src/components-next/list-components/AttributeList.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
22
import { Platform, Pressable, StyleSheet } from 'react-native';
33
import Animated from 'react-native-reanimated';
44
import Clipboard from '@react-native-clipboard/clipboard';
5+
import * as Sentry from '@sentry/react-native';
56

67
import { CaretRight } from '@/svg-icons';
78
import { tailwind } from '@/theme';
@@ -20,8 +21,12 @@ const AttributeItem = (props: AttributeItemProps) => {
2021

2122
const handlePress = () => {
2223
if (formattedValue) {
23-
Clipboard.setString(formattedValue);
24-
showToast({ message: `${listItem.title} copied to clipboard` });
24+
try {
25+
Clipboard.setString(formattedValue);
26+
showToast({ message: `${listItem.title} copied to clipboard` });
27+
} catch (error) {
28+
Sentry.captureException(error);
29+
}
2530
}
2631
};
2732

src/constants/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const AVAILABILITY_STATUS_LIST = [
2323
{ statusColor: 'bg-gray-800', status: 'offline' },
2424
];
2525

26-
export const MAXIMUM_FILE_UPLOAD_SIZE = 10;
26+
export const MAXIMUM_FILE_UPLOAD_SIZE = 20;
2727

2828
export const CONVERSATION_STATUSES = [
2929
{

src/navigation/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
1919
import { RefsProvider } from '@/context';
2020
import { SafeAreaProvider } from 'react-native-safe-area-context';
2121
import { transformNotification } from '@/utils/camelCaseKeys';
22-
// import { NoNetworkBar } from '@/components-next';
2322

2423
messaging().setBackgroundMessageHandler(async remoteMessage => {
2524
// console.log('Message handled in the background!', remoteMessage);
@@ -156,10 +155,7 @@ export const AppNavigationContainer = () => {
156155
}}
157156
onStateChange={async () => {
158157
routeNameRef.current = navigationRef.current?.getCurrentRoute()?.name;
159-
}}
160-
// theme={theme}
161-
>
162-
{/* <NoNetworkBar /> */}
158+
}}>
163159
<BottomSheetModalProvider>
164160
<View style={styles.navigationLayout} onLayout={onLayoutRootView}>
165161
<AppTabs />

src/navigation/tabs/AppTabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ const Tabs = () => {
9797
}, []);
9898

9999
const initAnalytics = useCallback(async () => {
100-
AnalyticsHelper.identify(user);
100+
if (user) {
101+
AnalyticsHelper.identify(user);
102+
}
101103
// eslint-disable-next-line react-hooks/exhaustive-deps
102104
}, []);
103105

0 commit comments

Comments
 (0)