mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-15 15:15:46 +02:00
Fix image pasting allowing more than 1 image in DMs
This commit is contained in:
parent
48c38f6e1d
commit
a391d8ee83
@ -522,7 +522,12 @@
|
||||
app.delegate(".js-compose-text,.js-reply-tweetbox", "paste", function(e){
|
||||
for(let item of e.originalEvent.clipboardData.items){
|
||||
if (item.type.startsWith("image/")){
|
||||
$(this).closest(".rpl").find(".js-reply-popout").click(); // popout direct messages
|
||||
if (!$(this).closest(".rpl").find(".js-reply-popout").click().length){ // popout direct messages
|
||||
if ($(".js-add-image-button").is(".is-disabled")){ // tweetdeck does not check upload count properly
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
uploader.addFilesToUpload([ item.getAsFile() ]);
|
||||
|
||||
$(".js-compose-text", ".js-docked-compose").focus();
|
||||
|
Loading…
Reference in New Issue
Block a user