Skip to content

Commit

Permalink
Merge pull request #234 from amosproj/bugfix-remove-unused-libs
Browse files Browse the repository at this point in the history
Bugfixes of save txt
  • Loading branch information
lukas-varga authored Jul 2, 2024
2 parents ac89caf + c40d733 commit 5d53c95
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 45 deletions.
13 changes: 11 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
"associatedDomains": [
"applinks:ailixir.page.link"
],
"googleServicesFile": "./google-services.plist"
"googleServicesFile": "./google-services.plist",
"permissions": [
"MEDIA_LIBRARY",
"CAMERA",
"PHOTO_LIBRARY"
]
},
"android": {
"adaptiveIcon": {
Expand All @@ -49,7 +54,11 @@
"category":["BROWSABLE", "DEFAULT"]
}
],
"googleServicesFile": "./google-services.json"
"googleServicesFile": "./google-services.json",
"permissions": [
"WRITE_EXTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE"
]
},
"web": {
"favicon": "./assets/favicon.png",
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@expo/metro-runtime": "~3.2.1",
"@gorhom/bottom-sheet": "^4",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-camera-roll/camera-roll": "^7.8.1",
"@react-native-community/netinfo": "^11.3.2",
"@react-native-firebase/app": "^20.1.0",
"@react-native-firebase/auth": "^20.1.0",
Expand All @@ -43,7 +42,6 @@
"expo-file-system": "^17.0.1",
"expo-font": "~12.0.6",
"expo-media-library": "^16.0.4",
"expo-sharing": "^12.0.1",
"expo-speech": "^12.0.2",
"expo-splash-screen": "~0.27.4",
"expo-status-bar": "~1.12.1",
Expand All @@ -54,7 +52,6 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-blob-util": "^0.19.9",
"react-native-element-dropdown": "^2.12.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "~2.16.1",
Expand Down
19 changes: 15 additions & 4 deletions src/frontend/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { DrawerActions, type RouteProp, useRoute } from '@react-navigation/nativ
import * as Clipboard from 'expo-clipboard';
import * as FileSystem from 'expo-file-system';
import * as MediaLibrary from 'expo-media-library';
import * as Sharing from 'expo-sharing';
import React from 'react';
import { Alert, Pressable, View } from 'react-native';
import RNFetchBlob from 'react-native-blob-util';
import React, { useEffect } from 'react';
import { Alert, Pressable, View, Platform } from 'react-native';
import RNFS from 'react-native-fs';
import { IconButton, Surface, Text, useTheme } from 'react-native-paper';
import { useActiveChatId, useGetChat, useLLMs } from 'src/frontend/hooks';
Expand All @@ -24,6 +22,19 @@ export function Header(props: DrawerHeaderProps) {
const { activeLLMs, toggleLLM } = useLLMs(activeChatId || 'default');
const { chat, status, error } = useGetChat(activeChatId);

useEffect(() => {
const requestPermissions = async () => {
if (Platform.OS === 'android') {
const { status } = await MediaLibrary.requestPermissionsAsync();
if (status !== 'granted') {
Alert.alert('Permission Denied', 'Media library permissions are required.');
}
}
};

requestPermissions();
}, []);

// Saving to download and clipboard
const handleAction = async () => {
try {
Expand Down
37 changes: 1 addition & 36 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2192,11 +2192,6 @@
dependencies:
merge-options "^3.0.4"

"@react-native-camera-roll/camera-roll@^7.8.1":
version "7.8.1"
resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.8.1.tgz#3b37d498672f692d04daf8e56fa094cefdeadc30"
integrity sha512-voVmDlzBS1MVADFk/Vb9GzWzhpoF4ESSjU9qwDNxf/ZA9tirAzX/M0TKcz2V+iFHeRR68cHtZ9tHUhQVG7kJcA==

"@react-native-community/[email protected]":
version "13.6.6"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-13.6.6.tgz#87c7ad8746c38dab0fe7b3c6ff89d44351d5d943"
Expand Down Expand Up @@ -3093,7 +3088,7 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==

base-64@0.1.0, base-64@^0.1.0:
base-64@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb"
integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA==
Expand Down Expand Up @@ -4239,11 +4234,6 @@ [email protected]:
dependencies:
invariant "^2.2.4"

expo-sharing@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/expo-sharing/-/expo-sharing-12.0.1.tgz#6c4d951beda47dac47112e679d60fc06c233b7aa"
integrity sha512-wBT+WeXwapj/9NWuLJO01vi9bdlchYu/Q/xD8slL/Ls4vVYku8CPqzkTtDFcjLrjtlJqyeHsdQXwKLvORmBIew==

expo-speech@^12.0.2:
version "12.0.2"
resolved "https://registry.yarnpkg.com/expo-speech/-/expo-speech-12.0.2.tgz#d6d8d1daf6c40eda4eb8358ec221e5283d768c40"
Expand Down Expand Up @@ -4724,18 +4714,6 @@ glob@^10.2.2:
minipass "^7.1.2"
path-scurry "^1.11.1"

glob@^10.3.10:
version "10.4.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.2.tgz#bed6b95dade5c1f80b4434daced233aee76160e5"
integrity sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==
dependencies:
foreground-child "^3.1.0"
jackspeak "^3.1.2"
minimatch "^9.0.4"
minipass "^7.1.2"
package-json-from-dist "^1.0.0"
path-scurry "^1.11.1"

glob@^6.0.1:
version "6.0.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
Expand Down Expand Up @@ -6452,11 +6430,6 @@ p-try@^2.0.0:
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==

package-json-from-dist@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00"
integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==

parse-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
Expand Down Expand Up @@ -6787,14 +6760,6 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-native-blob-util@^0.19.9:
version "0.19.9"
resolved "https://registry.yarnpkg.com/react-native-blob-util/-/react-native-blob-util-0.19.9.tgz#6f2c27d77cd36b9e03c967c54930491404d9d780"
integrity sha512-gIuErPqGbBIAPWf+K07x/8mRZ80Waz9DWgwMdQ8zWgms8kYfAji0GNk2gvZZ0y9MKe61jme7oOdZ7InWLRy2GA==
dependencies:
base-64 "0.1.0"
glob "^10.3.10"

react-native-drawer-layout@^4.0.0-alpha.9:
version "4.0.0-alpha.9"
resolved "https://registry.yarnpkg.com/react-native-drawer-layout/-/react-native-drawer-layout-4.0.0-alpha.9.tgz#761722ddce43d37ea8d12e902fd5c550489e4c4e"
Expand Down

0 comments on commit 5d53c95

Please sign in to comment.