feat: use native preview for pdf in mobile webview (#1728)
This commit is contained in:
@@ -20,7 +20,7 @@ export const downloadBlobOnAndroid = async (
|
||||
})
|
||||
}
|
||||
const base64 = await getBase64FromBlob(blob)
|
||||
const downloaded = await application.mobileDevice.downloadBase64AsFile(base64, filename)
|
||||
const downloaded = await application.mobileDevice().downloadBase64AsFile(base64, filename)
|
||||
if (loadingToastId) {
|
||||
dismissToast(loadingToastId)
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@ export const shareBlobOnMobile = async (application: WebApplication, blob: Blob,
|
||||
throw new Error('Share function being used outside mobile webview')
|
||||
}
|
||||
const base64 = await getBase64FromBlob(blob)
|
||||
application.mobileDevice.shareBase64AsFile(base64, filename)
|
||||
application.mobileDevice().shareBase64AsFile(base64, filename)
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ const AndroidBackHandlerProvider = ({ application, children }: ProviderProps) =>
|
||||
|
||||
useEffect(() => {
|
||||
const removeListener = addAndroidBackHandler(() => {
|
||||
application.mobileDevice.confirmAndExit()
|
||||
application.mobileDevice().confirmAndExit()
|
||||
return true
|
||||
})
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user