Browse Source

合并

master
jiahao 5 years ago
parent
commit
4c9419a89a
2 changed files with 9 additions and 12 deletions
  1. +5
    -2
      lib/chat/ChatPageItem.dart
  2. +4
    -10
      lib/chat/group_chat_item.dart

+ 5
- 2
lib/chat/ChatPageItem.dart View File

@@ -645,10 +645,13 @@ class _ChatPageItemState extends State<ChatPageItem>
}); });
if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) { if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) {
//分享文件 //分享文件
actions.add('保存文件');
actions.add(I18n.of(context).copy_download_url);
actionsFunc.add(() async{ actionsFunc.add(() async{
UploadUtil().copyFileUrl(widget.msg, context);
String path = widget.msg.localFile; String path = widget.msg.localFile;
String type='file'; String type='file';


+ 4
- 10
lib/chat/group_chat_item.dart View File

@@ -596,11 +596,11 @@ class _GroupChatPageItemState extends State<GroupChatPageItem>
if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) { if (widget.msg.msgType == ChatType.FileChatType.value &&widget.msg.localFile!=null) {
//分享文件 //分享文件
actions.add('保存文件');
actions.add( I18n.of(context).copy_download_url);
actionsFunc.add(() async{ actionsFunc.add(() async{
//如果是文件增加复制下载地址
String path = widget.msg.localFile; String path = widget.msg.localFile;
UploadUtil().copyFileUrl(widget.msg, context);
String type='file'; String type='file';
if(path.contains('mp4') ||path.contains('mp3')){ if(path.contains('mp4') ||path.contains('mp3')){
type = 'video'; type = 'video';
@@ -626,13 +626,7 @@ class _GroupChatPageItemState extends State<GroupChatPageItem>
}); });
} }
//如果是文件增加复制下载地址
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) { if (widget.msg.msgType == ChatType.ShortVoiceChatType.value) {
var soundPlayMode = var soundPlayMode =


Loading…
Cancel
Save