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