Fixed ios related bugs, removed unimplemented actions to comply with apple guidelines
This commit is contained in:
parent
45a829082b
commit
d234074b87
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
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';
|
||||||
@ -14,9 +15,19 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
|||||||
@override
|
@override
|
||||||
Future<ListFilesResponse> run() async {
|
Future<ListFilesResponse> run() async {
|
||||||
List<WebDavFile> davFiles = (await (await WebdavApi.webdav).propfind(params.path)).toWebDavFiles();
|
List<WebDavFile> davFiles = (await (await WebdavApi.webdav).propfind(params.path)).toWebDavFiles();
|
||||||
davFiles.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/"); // somehow the current working folder is also listed, it is filtered here.
|
|
||||||
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
|
||||||
|
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 == "/");
|
||||||
|
|
||||||
return ListFilesResponse(files);
|
return ListFilesResponse(files);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,6 +3,7 @@ import 'dart:io';
|
|||||||
import 'package:better_open_file/better_open_file.dart';
|
import 'package:better_open_file/better_open_file.dart';
|
||||||
import 'package:filesize/filesize.dart';
|
import 'package:filesize/filesize.dart';
|
||||||
import 'package:flowder/flowder.dart';
|
import 'package:flowder/flowder.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:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
@ -166,14 +167,17 @@ class _FileElementState extends State<FileElement> {
|
|||||||
));
|
));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
Visibility(
|
||||||
|
visible: kReleaseMode,
|
||||||
|
child: ListTile(
|
||||||
leading: const Icon(Icons.share_outlined),
|
leading: const Icon(Icons.share_outlined),
|
||||||
title: const Text("Teilen"),
|
title: const Text("Teilen"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
UnimplementedDialog.show(context);
|
UnimplementedDialog.show(context);
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ class _FileUploadDialogState extends State<FileUploadDialog> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
state = FileUploadState.checkConflict;
|
state = FileUploadState.checkConflict;
|
||||||
});
|
});
|
||||||
await (await WebdavApi.webdav).mkcol(widget.remotePath.join("/"));
|
//await (await WebdavApi.webdav).mkcol(widget.remotePath.join("/")); // TODO is this needed? It does not work anymore...
|
||||||
List<WebDavResponse> result = (await webdavClient.propfind(widget.remotePath.join("/"))).responses;
|
List<WebDavResponse> result = (await webdavClient.propfind(widget.remotePath.join("/"))).responses;
|
||||||
if(result.any((element) => element.href!.endsWith("/$targetFileName"))) {
|
if(result.any((element) => element.href!.endsWith("/$targetFileName"))) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -209,7 +209,9 @@ class _FilesState extends State<Files> {
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
Visibility(
|
||||||
|
visible: !Platform.isIOS,
|
||||||
|
child: ListTile(
|
||||||
leading: const Icon(Icons.add_a_photo_outlined),
|
leading: const Icon(Icons.add_a_photo_outlined),
|
||||||
title: const Text("Aus Gallerie hochladen"),
|
title: const Text("Aus Gallerie hochladen"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -220,6 +222,7 @@ class _FilesState extends State<Files> {
|
|||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../../../api/marianumcloud/talk/getReactions/getReactions.dart';
|
import '../../../api/marianumcloud/talk/getReactions/getReactions.dart';
|
||||||
@ -54,10 +55,13 @@ class _MessageReactionsState extends State<MessageReactions> {
|
|||||||
leading: const CenteredLeading(Icon(Icons.person)),
|
leading: const CenteredLeading(Icon(Icons.person)),
|
||||||
title: Text(e.actorDisplayName),
|
title: Text(e.actorDisplayName),
|
||||||
subtitle: isSelf ? const Text("Du") : e.actorType == GetReactionsResponseObjectActorType.guests ? const Text("Gast") : null,
|
subtitle: isSelf ? const Text("Du") : e.actorType == GetReactionsResponseObjectActorType.guests ? const Text("Gast") : null,
|
||||||
trailing: isSelf ? null : IconButton(
|
trailing: isSelf ? null : Visibility(
|
||||||
|
visible: kReleaseMode,
|
||||||
|
child: IconButton(
|
||||||
onPressed: () => UnimplementedDialog.show(context),
|
onPressed: () => UnimplementedDialog.show(context),
|
||||||
icon: const Icon(Icons.textsms_outlined),
|
icon: const Icon(Icons.textsms_outlined),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
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:persistent_bottom_nav_bar/persistent_tab_view.dart';
|
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
|
||||||
@ -73,13 +74,16 @@ class AppointmentDetails {
|
|||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.person),
|
leading: const Icon(Icons.person),
|
||||||
title: Text("Lehrkraft: (${timetableData.te[0].name}) ${timetableData.te[0].longname}"),
|
title: Text("Lehrkraft: (${timetableData.te[0].name}) ${timetableData.te[0].longname}"),
|
||||||
trailing: IconButton(
|
trailing: Visibility(
|
||||||
|
visible: kReleaseMode,
|
||||||
|
child: IconButton(
|
||||||
icon: const Icon(Icons.textsms_outlined),
|
icon: const Icon(Icons.textsms_outlined),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
UnimplementedDialog.show(context);
|
UnimplementedDialog.show(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: const Icon(Icons.abc),
|
leading: const Icon(Icons.abc),
|
||||||
title: Text("Typ: ${timetableData.activityType}"),
|
title: Text("Typ: ${timetableData.activityType}"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user