When adding multiple files, if there is only one reply and no file has been selected, set the first file to it instead of creating a new reply.
This commit is contained in:
parent
84057f65c1
commit
4f2c1eb775
@ -1300,7 +1300,11 @@
|
||||
qr.error("" + file.name + ": Unsupported file type.");
|
||||
break;
|
||||
}
|
||||
new qr.reply(file);
|
||||
if (qr.replies.length === 1 && !qr.replies[0].file) {
|
||||
qr.replies[0].file = file;
|
||||
} else {
|
||||
new qr.reply(file);
|
||||
}
|
||||
}
|
||||
return $.addClass(qr.el, 'dump');
|
||||
},
|
||||
|
||||
@ -961,7 +961,11 @@ qr =
|
||||
else if -1 is qr.mimeTypes.indexOf file.type
|
||||
qr.error "#{file.name}: Unsupported file type."
|
||||
break
|
||||
new qr.reply file
|
||||
if qr.replies.length is 1 and not qr.replies[0].file
|
||||
# set initial reply's file
|
||||
qr.replies[0].file = file
|
||||
else
|
||||
new qr.reply file
|
||||
$.addClass qr.el, 'dump'
|
||||
|
||||
replies: []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user