mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 02:07:57 -06:00
Removed the IOS guard for the Download feature.
Enabled the UISupportsDocumentBrowser IOS option so that the App Documents are visible for other apps.
This commit is contained in:
@@ -67,5 +67,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>UISupportsDocumentBrowser</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -37,20 +37,19 @@ class _DocumentDownloadButtonState extends State<DocumentDownloadButton> {
|
|||||||
width: 16,
|
width: 16,
|
||||||
)
|
)
|
||||||
: const Icon(Icons.download),
|
: const Icon(Icons.download),
|
||||||
onPressed: Platform.isAndroid && widget.document != null && widget.enabled
|
onPressed: widget.document != null && widget.enabled
|
||||||
? () => _onDownload(widget.document!)
|
? () => _onDownload(widget.document!)
|
||||||
: null,
|
: null,
|
||||||
).paddedOnly(right: 4);
|
).paddedOnly(right: 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onDownload(DocumentModel document) async {
|
Future<void> _onDownload(DocumentModel document) async {
|
||||||
if (!Platform.isAndroid) {
|
// if (!Platform.isAndroid) {
|
||||||
showSnackBar(
|
// showSnackBar(
|
||||||
context, "This feature is currently only supported on Android!");
|
// context, "This feature is currently only supported on Android!");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
if (true) {
|
if (Platform.isAndroid && androidInfo!.version.sdkInt! < 30) {
|
||||||
// should check for android versions < 30
|
|
||||||
final isGranted = await askForPermission(Permission.storage);
|
final isGranted = await askForPermission(Permission.storage);
|
||||||
if (!isGranted) {
|
if (!isGranted) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user