feat: mobile workspaces (#1093)

This commit is contained in:
Vardan Hakobyan
2022-06-21 15:42:43 +04:00
committed by GitHub
parent 1f903f17d1
commit 7d60dfee73
71 changed files with 599 additions and 317 deletions

View File

@@ -560,7 +560,7 @@ export const useFiles = ({ note }: Props) => {
return
}
if (shouldAttachToNote(currentTab)) {
uploadedFiles.forEach(file => attachFileToNote(file, false))
uploadedFiles.forEach((file) => attachFileToNote(file, false))
}
},
},
@@ -587,7 +587,7 @@ export const useFiles = ({ note }: Props) => {
},
},
]
const osSpecificOptions = Platform.OS === 'android' ? options.filter(option => option.key !== 'library') : options
const osSpecificOptions = Platform.OS === 'android' ? options.filter((option) => option.key !== 'library') : options
showActionSheet({
title: 'Choose action',
options: osSpecificOptions,
@@ -783,7 +783,7 @@ export const useFiles = ({ note }: Props) => {
},
]
const osDependentActions =
Platform.OS === 'ios' ? actions.filter(action => action.text !== 'Download') : [...actions]
Platform.OS === 'ios' ? actions.filter((action) => action.text !== 'Download') : [...actions]
showActionSheet({
title: file.name,
options: osDependentActions,

View File

@@ -0,0 +1,8 @@
import { ApplicationGroup } from '@Lib/ApplicationGroup'
import { ApplicationGroupContext } from '@Root/ApplicationGroupContext'
import { useContext } from 'react'
export const useSafeApplicationGroupContext = () => {
const applicationGroupContext = useContext(ApplicationGroupContext) as ApplicationGroup
return applicationGroupContext
}