mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Apply last suggestion and fix mistake not letting the user upload an
image after attempting to upload a file that is not an image.
This commit is contained in:
parent
205122ee68
commit
970503b755
1 changed files with 2 additions and 1 deletions
|
@ -106,7 +106,7 @@ void upload(const QMimeData *source, ChannelPtr channel,
|
|||
{
|
||||
for (const QUrl &path : source->urls())
|
||||
{
|
||||
if (getImageFileFormat(path.toLocalFile()) != QString())
|
||||
if (!getImageFileFormat(path.toLocalFile()).isEmpty())
|
||||
{
|
||||
channel->addMessage(makeSystemMessage(
|
||||
QString("Uploading image: %1").arg(path.toLocalFile())));
|
||||
|
@ -147,6 +147,7 @@ void upload(const QMimeData *source, ChannelPtr channel,
|
|||
channel->addMessage(makeSystemMessage(
|
||||
QString("Cannot upload file: %1, not an image")
|
||||
.arg(path.toLocalFile())));
|
||||
isUploading = false;
|
||||
}
|
||||
}
|
||||
if (uploadQueue.size())
|
||||
|
|
Loading…
Reference in a new issue