mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
fix data view not clearing
This commit is contained in:
parent
e073faf6ed
commit
75a27eb98a
@ -88,7 +88,7 @@ public:
|
||||
|
||||
void UpdateConnectionListWithRecreate(const QList<NekoGui_traffic::ConnectionMetadata>& connections);
|
||||
|
||||
void UpdateDataView();
|
||||
void UpdateDataView(bool force = false);
|
||||
|
||||
void setDownloadReport(const DownloadProgressReport& report, bool show);
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ namespace NekoGui_network {
|
||||
runOnUiThread([=]
|
||||
{
|
||||
GetMainWindow()->setDownloadReport({}, false);
|
||||
GetMainWindow()->UpdateDataView();
|
||||
GetMainWindow()->UpdateDataView(true);
|
||||
});
|
||||
if(_reply->error() != QNetworkReply::NetworkError::NoError) {
|
||||
return _reply->errorString();
|
||||
|
||||
@ -928,9 +928,9 @@ void MainWindow::neko_set_spmode_vpn(bool enable, bool save) {
|
||||
if (NekoGui::dataStore->started_id >= 0) neko_start(NekoGui::dataStore->started_id);
|
||||
}
|
||||
|
||||
void MainWindow::UpdateDataView()
|
||||
void MainWindow::UpdateDataView(bool force)
|
||||
{
|
||||
if (lastUpdated.msecsTo(QDateTime::currentDateTime()) < 100)
|
||||
if (!force && lastUpdated.msecsTo(QDateTime::currentDateTime()) < 100)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ void MainWindow::runSpeedTest(const QString& config, bool useDefault, bool testC
|
||||
runOnUiThread([=]
|
||||
{
|
||||
showSpeedtestData = false;
|
||||
UpdateDataView();
|
||||
UpdateDataView(true);
|
||||
});
|
||||
doneMu->unlock();
|
||||
delete doneMu;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user