From 4c9419a89ac01b81990f8abe582cc610fa03aca0 Mon Sep 17 00:00:00 2001 From: jiahao <283739569@qq.com> Date: Wed, 25 Mar 2020 16:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/chat/ChatPageItem.dart | 7 +++++-- lib/chat/group_chat_item.dart | 14 ++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/chat/ChatPageItem.dart b/lib/chat/ChatPageItem.dart index 03a7d1b..4f06c4a 100644 --- a/lib/chat/ChatPageItem.dart +++ b/lib/chat/ChatPageItem.dart @@ -645,10 +645,13 @@ class _ChatPageItemState extends State }); if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) { + + + //分享文件 - actions.add('保存文件'); + actions.add(I18n.of(context).copy_download_url); actionsFunc.add(() async{ - + UploadUtil().copyFileUrl(widget.msg, context); String path = widget.msg.localFile; String type='file'; diff --git a/lib/chat/group_chat_item.dart b/lib/chat/group_chat_item.dart index f7c132b..5f3eda9 100644 --- a/lib/chat/group_chat_item.dart +++ b/lib/chat/group_chat_item.dart @@ -596,11 +596,11 @@ class _GroupChatPageItemState extends State if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) { //分享文件 - actions.add('保存文件'); + actions.add( I18n.of(context).copy_download_url); actionsFunc.add(() async{ - + //如果是文件增加复制下载地址 String path = widget.msg.localFile; - + UploadUtil().copyFileUrl(widget.msg, context); String type='file'; if(path.contains('mp4') ||path.contains('mp3')){ type = 'video'; @@ -626,13 +626,7 @@ class _GroupChatPageItemState extends State }); } - //如果是文件增加复制下载地址 - if (widget.msg.msgType == ChatType.FileChatType.value) { - actions.insert(0, I18n.of(context).copy_download_url); - actionsFunc.insert(0, () { - UploadUtil().copyFileUrl(widget.msg, context); - }); - } + if (widget.msg.msgType == ChatType.ShortVoiceChatType.value) { var soundPlayMode =