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 '../../../../../model/endpointData.dart';
|
||||
import '../../webdavApi.dart';
|
||||
import 'cacheableFile.dart';
|
||||
import 'listFilesParams.dart';
|
||||
@ -14,9 +15,19 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
||||
@override
|
||||
Future<ListFilesResponse> run() async {
|
||||
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();
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ import 'dart:io';
|
||||
import 'package:better_open_file/better_open_file.dart';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flowder/flowder.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
@ -166,14 +167,17 @@ class _FileElementState extends State<FileElement> {
|
||||
));
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.share_outlined),
|
||||
title: const Text("Teilen"),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
UnimplementedDialog.show(context);
|
||||
},
|
||||
)
|
||||
Visibility(
|
||||
visible: kReleaseMode,
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.share_outlined),
|
||||
title: const Text("Teilen"),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
UnimplementedDialog.show(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ class _FileUploadDialogState extends State<FileUploadDialog> {
|
||||
setState(() {
|
||||
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;
|
||||
if(result.any((element) => element.href!.endsWith("/$targetFileName"))) {
|
||||
setState(() {
|
||||
|
@ -209,16 +209,19 @@ class _FilesState extends State<Files> {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.add_a_photo_outlined),
|
||||
title: const Text("Aus Gallerie hochladen"),
|
||||
onTap: () {
|
||||
context.loaderOverlay.show();
|
||||
FilePick.galleryPick().then((value) {
|
||||
mediaUpload(value?.path);
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
Visibility(
|
||||
visible: !Platform.isIOS,
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.add_a_photo_outlined),
|
||||
title: const Text("Aus Gallerie hochladen"),
|
||||
onTap: () {
|
||||
context.loaderOverlay.show();
|
||||
FilePick.galleryPick().then((value) {
|
||||
mediaUpload(value?.path);
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../api/marianumcloud/talk/getReactions/getReactions.dart';
|
||||
@ -54,9 +55,12 @@ class _MessageReactionsState extends State<MessageReactions> {
|
||||
leading: const CenteredLeading(Icon(Icons.person)),
|
||||
title: Text(e.actorDisplayName),
|
||||
subtitle: isSelf ? const Text("Du") : e.actorType == GetReactionsResponseObjectActorType.guests ? const Text("Gast") : null,
|
||||
trailing: isSelf ? null : IconButton(
|
||||
onPressed: () => UnimplementedDialog.show(context),
|
||||
icon: const Icon(Icons.textsms_outlined),
|
||||
trailing: isSelf ? null : Visibility(
|
||||
visible: kReleaseMode,
|
||||
child: IconButton(
|
||||
onPressed: () => UnimplementedDialog.show(context),
|
||||
icon: const Icon(Icons.textsms_outlined),
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
|
||||
@ -73,11 +74,14 @@ class AppointmentDetails {
|
||||
ListTile(
|
||||
leading: const Icon(Icons.person),
|
||||
title: Text("Lehrkraft: (${timetableData.te[0].name}) ${timetableData.te[0].longname}"),
|
||||
trailing: IconButton(
|
||||
icon: const Icon(Icons.textsms_outlined),
|
||||
onPressed: () {
|
||||
UnimplementedDialog.show(context);
|
||||
},
|
||||
trailing: Visibility(
|
||||
visible: kReleaseMode,
|
||||
child: IconButton(
|
||||
icon: const Icon(Icons.textsms_outlined),
|
||||
onPressed: () {
|
||||
UnimplementedDialog.show(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
|
Loading…
x
Reference in New Issue
Block a user