···22import {Camera} from 'expo-camera'
33import * as MediaLibrary from 'expo-media-library'
44import {Linking} from 'react-native'
55+import {isWeb} from 'platform/detection'
5667const openSettings = () => {
78 Linking.openURL('app-settings:')
···2425export function usePhotoLibraryPermission() {
2526 const [mediaLibraryPermissions] = MediaLibrary.usePermissions()
2627 const requestPhotoAccessIfNeeded = async () => {
2828+ // On the, we use <input type="file"> to produce a filepicker
2929+ // This does not need any permission granting.
3030+ if (isWeb) {
3131+ return true
3232+ }
3333+2734 if (mediaLibraryPermissions?.status === 'granted') {
2835 return true
2936 } else {
+12
src/lib/media/picker.web.tsx
···111111// helpers
112112// =
113113114114+/**
115115+ * Opens the select file dialog in the browser.
116116+ * NOTE:
117117+ * If in the future someone updates this method to use:
118118+ * https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker
119119+ * Check that the `showOpenFilePicker` API does not require any permissions
120120+ * granted to use. As of this writing, it does not, but that could change
121121+ * in the future. If the user does need to go through a permissions granting
122122+ * flow, then checkout the usePhotoLibraryPermission() hook in
123123+ * src/lib/hooks/usePermissions.ts
124124+ * so that it gets appropriately updated.
125125+ */
114126function selectFile(opts: PickerOpts): Promise<PickedFile> {
115127 return new Promise((resolve, reject) => {
116128 var input = document.createElement('input')
-2
src/view/shell/index.web.tsx
···77import {ErrorBoundary} from '../com/util/ErrorBoundary'
88import {Lightbox} from '../com/lightbox/Lightbox'
99import {ModalsContainer} from '../com/modals/Modal'
1010-import {Text} from 'view/com/util/text/Text'
1110import {Composer} from './Composer.web'
1212-import {usePalette} from 'lib/hooks/usePalette'
1311import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
1412import {s, colors} from 'lib/styles'
1513import {RoutesContainer, FlatNavigator} from '../../Navigation'