add: added more subscription link check

This commit is contained in:
Qv2ray-dev 2020-07-11 00:03:17 +08:00
parent b7e8ab315e
commit 14bb40aa1e
No known key found for this signature in database
GPG Key ID: E7FAEFAFCD031D4B
2 changed files with 11 additions and 1 deletions

View File

@ -1 +1 @@
5766
5767

View File

@ -275,6 +275,16 @@ void GroupManager::on_addGroupButton_clicked()
void GroupManager::on_updateButton_clicked()
{
if (subAddrTxt->text().trimmed().isEmpty())
{
QvMessageBoxWarn(this, tr("Update Subscription"), tr("The subscription link is empty."));
return;
}
if (!QUrl{ subAddrTxt->text() }.isValid())
{
QvMessageBoxWarn(this, tr("Update Subscription"), tr("The subscription link is invalid."));
return;
}
if (QvMessageBoxAsk(this, tr("Update Subscription"), tr("Would you like to update the subscription?")) == QMessageBox::Yes)
{
this->setEnabled(false);