Merge branch 'develop' into feature-highEduGraduationCalculator

# Conflicts:
#	lib/view/pages/overhang.dart
This commit is contained in:
2024-03-24 14:21:01 +01:00
11 changed files with 113 additions and 95 deletions

View File

@ -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 == "/");