Disabled out of date fix for files, and disabled file download in staging
This commit is contained in:
parent
1374666858
commit
5134f50523
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
import 'package:nextcloud/nextcloud.dart';
|
import 'package:nextcloud/nextcloud.dart';
|
||||||
|
|
||||||
import '../../../../../model/endpointData.dart';
|
|
||||||
import '../../webdavApi.dart';
|
import '../../webdavApi.dart';
|
||||||
import 'cacheableFile.dart';
|
import 'cacheableFile.dart';
|
||||||
import 'listFilesParams.dart';
|
import 'listFilesParams.dart';
|
||||||
@ -18,12 +17,13 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
|||||||
Set<CacheableFile> files = davFiles.map((e) => CacheableFile.fromDavFile(e)).toSet();
|
Set<CacheableFile> files = davFiles.map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||||
|
|
||||||
// webdav handles subdirectories wrong, this is a fix
|
// webdav handles subdirectories wrong, this is a fix
|
||||||
if(EndpointData().getEndpointMode() == EndpointMode.stage) {
|
// currently this fix is not needed anymore
|
||||||
files = files.map((e) { // somehow
|
// if(EndpointData().getEndpointMode() == EndpointMode.stage) {
|
||||||
e.path = e.path.split("mobile/cloud/remote.php/webdav")[1];
|
// files = files.map((e) { // somehow
|
||||||
return e;
|
// e.path = e.path.split("mobile/cloud/remote.php/webdav")[1];
|
||||||
}).toSet();
|
// return e;
|
||||||
}
|
// }).toSet();
|
||||||
|
// }
|
||||||
|
|
||||||
// somehow the current working folder is also listed, it is filtered here.
|
// somehow the current working folder is also listed, it is filtered here.
|
||||||
files.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/");
|
files.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/");
|
||||||
|
@ -6,11 +6,13 @@ import 'package:flowder/flowder.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.dart';
|
import 'package:jiffy/jiffy.dart';
|
||||||
|
import 'package:marianum_mobile/widget/infoDialog.dart';
|
||||||
import 'package:nextcloud/nextcloud.dart';
|
import 'package:nextcloud/nextcloud.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
import '../../../api/marianumcloud/webdav/queries/listFiles/cacheableFile.dart';
|
import '../../../api/marianumcloud/webdav/queries/listFiles/cacheableFile.dart';
|
||||||
import '../../../api/marianumcloud/webdav/webdavApi.dart';
|
import '../../../api/marianumcloud/webdav/webdavApi.dart';
|
||||||
|
import '../../../model/endpointData.dart';
|
||||||
import '../../../widget/centeredLeading.dart';
|
import '../../../widget/centeredLeading.dart';
|
||||||
import '../../../widget/confirmDialog.dart';
|
import '../../../widget/confirmDialog.dart';
|
||||||
import '../../../widget/fileViewer.dart';
|
import '../../../widget/fileViewer.dart';
|
||||||
@ -103,6 +105,10 @@ class _FileElementState extends State<FileElement> {
|
|||||||
},
|
},
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
|
if(EndpointData().getEndpointMode() == EndpointMode.stage) {
|
||||||
|
InfoDialog.show(context, "Virtuelle Dateien im Staging Prozess können nicht heruntergeladen werden!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(widget.file.currentlyDownloading) {
|
if(widget.file.currentlyDownloading) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user