implemented native share intent support for android and ios with chat and folder pickers

This commit is contained in:
2026-05-09 19:42:51 +02:00
parent 00664c66a8
commit cb2c38aaa1
25 changed files with 1046 additions and 26 deletions
@@ -0,0 +1,21 @@
import '../files_sharing/file_sharing_api.dart';
import '../files_sharing/file_sharing_api_params.dart';
/// WebDAV folder under which Talk-shared files are uploaded before being
/// linked into a chat.
const String talkShareFolder = 'MarianumMobile';
/// Posts each already-uploaded WebDAV path as a Talk share (ShareType 10) to
/// the given conversation token. Calls run concurrently — the server accepts
/// parallel posts and the picker UI is blocked anyway, so we shouldn't pay
/// O(n*RTT) latency per share.
Future<void> shareFilesToChat({
required String token,
required List<String> remoteFilePaths,
}) => Future.wait(
remoteFilePaths.map(
(path) => FileSharingApi().share(
FileSharingApiParams(shareType: 10, shareWith: token, path: path),
),
),
);