mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +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 UpdateConnectionListWithRecreate(const QList<NekoGui_traffic::ConnectionMetadata>& connections);
|
||||||
|
|
||||||
void UpdateDataView();
|
void UpdateDataView(bool force = false);
|
||||||
|
|
||||||
void setDownloadReport(const DownloadProgressReport& report, bool show);
|
void setDownloadReport(const DownloadProgressReport& report, bool show);
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ namespace NekoGui_network {
|
|||||||
runOnUiThread([=]
|
runOnUiThread([=]
|
||||||
{
|
{
|
||||||
GetMainWindow()->setDownloadReport({}, false);
|
GetMainWindow()->setDownloadReport({}, false);
|
||||||
GetMainWindow()->UpdateDataView();
|
GetMainWindow()->UpdateDataView(true);
|
||||||
});
|
});
|
||||||
if(_reply->error() != QNetworkReply::NetworkError::NoError) {
|
if(_reply->error() != QNetworkReply::NetworkError::NoError) {
|
||||||
return _reply->errorString();
|
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);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -327,7 +327,7 @@ void MainWindow::runSpeedTest(const QString& config, bool useDefault, bool testC
|
|||||||
runOnUiThread([=]
|
runOnUiThread([=]
|
||||||
{
|
{
|
||||||
showSpeedtestData = false;
|
showSpeedtestData = false;
|
||||||
UpdateDataView();
|
UpdateDataView(true);
|
||||||
});
|
});
|
||||||
doneMu->unlock();
|
doneMu->unlock();
|
||||||
delete doneMu;
|
delete doneMu;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user