feat: mobile workspaces (#1093)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user