Skip to content

Commit 1ca4e7e

Browse files
authored
Merge pull request #63 from RonasIT/development
Development to Production
2 parents 352e369 + 1ed273e commit 1ca4e7e

13 files changed

Lines changed: 1392 additions & 845 deletions

File tree

apps/mobile/app.config.ts

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
2222
googleSignInRoute: process.env.GOOGLE_SIGN_IN_ROUTE,
2323
};
2424

25+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2526
return {
26-
name: process.env.EXPO_PUBLIC_APP_NAME as string,
27+
name: process.env.EXPO_PUBLIC_APP_NAME,
2728
slug: process.env.EXPO_PUBLIC_APP_SLUG as string,
2829
scheme: process.env.EXPO_PUBLIC_APP_SCHEME as string,
2930
owner: process.env.EXPO_PUBLIC_APP_OWNER as string,
30-
version: '1.4.0',
31+
version: '1.4.9',
3132
orientation: 'portrait',
3233
icon: './assets/icon.png',
33-
runtimeVersion: '1.4.0',
34+
runtimeVersion: '1.4.4',
3435
experiments: {
3536
reactCompiler: true,
3637
},
@@ -42,7 +43,7 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
4243
supportsTablet: false,
4344
buildNumber: appEnv.select({
4445
default: '18',
45-
production: '12',
46+
production: '23',
4647
}),
4748
config: {
4849
usesNonExemptEncryption: false,
@@ -52,7 +53,7 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
5253
package: appId,
5354
versionCode: appEnv.select({
5455
default: 15,
55-
production: 12,
56+
production: 23,
5657
}),
5758
adaptiveIcon: {
5859
foregroundImage: './assets/adaptive-icon.png',
@@ -88,10 +89,30 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
8889
[
8990
'expo-media-library',
9091
{
91-
photosPermission: 'Allow Open MobileUI to access your photos.',
9292
savePhotosPermission: 'Allow Open MobileUI to save photos.',
9393
},
9494
],
95+
'expo-audio',
96+
[
97+
'expo-build-properties',
98+
{
99+
android: {
100+
androidGradlePluginVersion: '8.3.2',
101+
compileSdkVersion: 35,
102+
targetSdkVersion: 35,
103+
buildToolsVersion: '35.0.0',
104+
ndkVersion: '27.1.12297006',
105+
packagingOptions: {
106+
jniLibs: {
107+
useLegacyPackaging: false,
108+
},
109+
},
110+
},
111+
ios: {
112+
useFrameworks: 'static',
113+
},
114+
},
115+
],
95116
googleAuthIosUrlScheme
96117
? [
97118
'@react-native-google-signin/google-signin',
@@ -100,10 +121,12 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
100121
},
101122
]
102123
: null,
124+
['./plugins/with-remove-media-playback-permission'],
103125
]),
104126
newArchEnabled: true,
105127
extra,
106-
};
128+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
129+
} as any;
107130
};
108131

109132
export default createConfig;

apps/mobile/package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,30 @@
3737
"@tanstack/react-query-persist-client": "^5.87.4",
3838
"babel-plugin-module-resolver": "^5.0.2",
3939
"clsx": "^2.1.1",
40-
"expo": "^54.0.0",
41-
"expo-asset": "~12.0.11",
42-
"expo-audio": "~1.1.0",
40+
"expo": "~54.0.34",
41+
"expo-asset": "~12.0.13",
42+
"expo-audio": "~1.1.1",
43+
"expo-build-properties": "~1.0.10",
4344
"expo-clipboard": "~8.0.8",
44-
"expo-constants": "~18.0.12",
45-
"expo-crypto": "~15.0.8",
46-
"expo-dev-client": "~6.0.20",
45+
"expo-constants": "~18.0.13",
46+
"expo-crypto": "~15.0.9",
47+
"expo-dev-client": "~6.0.21",
4748
"expo-document-picker": "~14.0.8",
48-
"expo-file-system": "~19.0.21",
49+
"expo-file-system": "~19.0.22",
4950
"expo-haptics": "~15.0.8",
5051
"expo-image": "~3.0.11",
51-
"expo-image-picker": "~17.0.10",
52+
"expo-image-picker": "~17.0.11",
5253
"expo-insights": "~0.10.8",
5354
"expo-linear-gradient": "~15.0.8",
54-
"expo-linking": "~8.0.10",
55+
"expo-linking": "~8.0.12",
5556
"expo-localization": "~17.0.8",
5657
"expo-media-library": "~18.2.1",
57-
"expo-router": "~6.0.19",
58+
"expo-router": "~6.0.23",
5859
"expo-sharing": "~14.0.8",
5960
"expo-speech": "~14.0.8",
60-
"expo-splash-screen": "~31.0.12",
61+
"expo-splash-screen": "~31.0.13",
6162
"expo-status-bar": "~3.0.9",
62-
"expo-updates": "~29.0.15",
63+
"expo-updates": "~29.0.17",
6364
"immer": "^10.1.1",
6465
"lodash-es": "^4.17.21",
6566
"luxon": "^3.6.1",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const { withAndroidManifest } = require('@expo/config-plugins');
2+
3+
const withRemoveMediaPlaybackPermission = (config) =>
4+
withAndroidManifest(config, (config) => {
5+
const manifest = config.modResults;
6+
7+
if (!manifest.manifest.$['xmlns:tools']) {
8+
manifest.manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
9+
}
10+
11+
const permissions = manifest.manifest['uses-permission'] ?? [];
12+
13+
const alreadyAdded = permissions.some(
14+
(p) => p.$['android:name'] === 'android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK',
15+
);
16+
17+
if (!alreadyAdded) {
18+
permissions.push({
19+
$: {
20+
'android:name': 'android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK',
21+
'tools:node': 'remove',
22+
},
23+
});
24+
}
25+
26+
manifest.manifest['uses-permission'] = permissions;
27+
28+
return config;
29+
});
30+
31+
module.exports = withRemoveMediaPlaybackPermission;

libs/mobile/chat/features/archived-chats-filters-sheet/src/lib/hooks/use-search-filters.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export const useSearchFilters = (): UseFiltersResult => {
5252
archivedChatsFilterState$.selectedFilter.set(filter);
5353
};
5454

55-
const resetFilter = (): void => archivedChatsFilterState$.selectedFilter.set(filters[0]);
55+
const resetFilter = (): void => {
56+
archivedChatsFilterState$.selectedFilter.set(filters[0]);
57+
};
5658

5759
return {
5860
filters,

libs/mobile/chat/features/attached-files-list/src/lib/component.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,25 @@ export function AttachedFilesList({
3030

3131
return (
3232
<View className='gap-8 mb-[8]'>
33-
{files?.map((file) => (
34-
<AttachedFileItem
33+
{files.flatMap((file) =>
34+
file ? [<AttachedFileItem
3535
key={file.id}
3636
file={file}
37-
onDeleteFilePress={onDeleteFilePress} />
38-
))}
37+
onDeleteFilePress={onDeleteFilePress} />] : [],
38+
)}
3939
<View className='gap-8 flex-row flex-wrap'>
40-
{images?.map((image, index) => (
41-
<AttachedImageItem
42-
key={image.uri}
43-
onImagePress={() => onImagePress(index)}
44-
onDeleteImagePress={onDeleteImagePress}
45-
image={image}
46-
/>
47-
))}
40+
{images.flatMap((image, index) =>
41+
image
42+
? [
43+
<AttachedImageItem
44+
key={image.uri}
45+
onImagePress={() => onImagePress(index)}
46+
onDeleteImagePress={onDeleteImagePress}
47+
image={image}
48+
/>,
49+
]
50+
: [],
51+
)}
4852
</View>
4953
</View>
5054
);

libs/mobile/chat/features/form-chat-input/src/lib/component.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,16 @@ export function FormChatInput<T extends FieldValues>({
8787

8888
const isInputEmpty = !field.value?.trim() && files.length === 0 && images.length === 0;
8989

90-
const imagesForPreview = images.map((image, index) => ({
91-
...new AttachedImage({ url: toDataUrl(image.base64) }),
92-
index,
93-
}));
90+
const imagesForPreview = images.flatMap((image, index) =>
91+
image
92+
? [
93+
{
94+
...new AttachedImage({ url: toDataUrl(image.base64) }),
95+
index,
96+
},
97+
]
98+
: [],
99+
);
94100

95101
const onVoiceModePress = async (): Promise<void> => {
96102
if (!modelId) {

libs/mobile/folder/features/upsert-folder-sheet/src/lib/component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function UpsertFolderSheet({ ref, ...props }: UpsertFolderSheetProps): Re
9090
}
9191
}, [folder]);
9292

93-
const files = useSelector(attachedFiles);
93+
const files = useSelector(attachedFiles).flatMap((file) => (file ? [file] : []));
9494

9595
const closeModal = (): void => sheetRef.current?.close();
9696

libs/mobile/shared/data-access/media-library-service/src/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { permissionAlertService } from '@open-webui-react-native/shared/utils/pe
55

66
export class MediaLibraryService {
77
public async saveImage(source: string, authorizationToken?: string): Promise<string | void> {
8-
const { status } = await MediaLibrary.requestPermissionsAsync(false, ['photo']);
8+
const { status } = await MediaLibrary.requestPermissionsAsync(true);
99

1010
if (status === MediaLibrary.PermissionStatus.DENIED) {
1111
permissionAlertService.showAlert(

0 commit comments

Comments
 (0)