Add variable storage locations & batch adding
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -3,10 +3,10 @@ import { Keyboard, StyleSheet } from 'react-native';
|
||||
import { FAB } from 'react-native-paper';
|
||||
import { ParamListBase, useNavigation } from '@react-navigation/native';
|
||||
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
import { pickSingle } from 'react-native-document-picker';
|
||||
import { pick } from 'react-native-document-picker';
|
||||
import { useDeviceOrientation } from '@react-native-community/hooks';
|
||||
import { ROUTE } from '../types';
|
||||
import { allowedMimeTypes, noOp } from '../utilities';
|
||||
import { useDeviceOrientation } from '@react-native-community/hooks';
|
||||
|
||||
const floatingActionButtonStyles = StyleSheet.create({
|
||||
fab: {
|
||||
@@ -65,9 +65,12 @@ const FloatingActionButton = ({ visible = true }: { visible?: boolean }) => {
|
||||
onStateChange={({ open }) => setState(open)}
|
||||
onPress={async () => {
|
||||
if (!state) return;
|
||||
const file = await pickSingle({ type: allowedMimeTypes }).catch(noOp);
|
||||
if (!file) return;
|
||||
navigate(ROUTE.ADD_MEME, { file });
|
||||
const files = await pick({
|
||||
type: allowedMimeTypes,
|
||||
allowMultiSelection: true,
|
||||
}).catch(noOp);
|
||||
if (!files) return;
|
||||
navigate(ROUTE.ADD_MEME, { files });
|
||||
}}
|
||||
style={
|
||||
orientation === 'portrait'
|
||||
|
Reference in New Issue
Block a user