mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-02 04:52:09 +00:00
Optimize Update Subscription
This commit is contained in:
parent
b9acd0ec28
commit
33dcef2285
1 changed files with 7 additions and 15 deletions
|
@ -537,7 +537,12 @@ namespace v2rayN.ViewModels
|
||||||
_noticeHandler?.SendMessage(msg);
|
_noticeHandler?.SendMessage(msg);
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
|
RefreshServers();
|
||||||
Reload();
|
Reload();
|
||||||
|
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
||||||
|
{
|
||||||
|
_updateView("AdjustMainLvColWidth");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void UpdateStatisticsHandler(ServerSpeedItem update)
|
private void UpdateStatisticsHandler(ServerSpeedItem update)
|
||||||
|
@ -1220,21 +1225,8 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSubscriptionProcess(string subId, bool blProxy)
|
private void UpdateSubscriptionProcess(string subId, bool blProxy)
|
||||||
{
|
{
|
||||||
void _updateUI(bool success, string msg)
|
(new UpdateHandle()).UpdateSubscriptionProcess(_config, subId, blProxy, UpdateTaskHandler);
|
||||||
{
|
|
||||||
_noticeHandler?.SendMessage(msg);
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
RefreshServers();
|
|
||||||
if (_config.uiItem.enableAutoAdjustMainLvColWidth)
|
|
||||||
{
|
|
||||||
_updateView("AdjustMainLvColWidth");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
(new UpdateHandle()).UpdateSubscriptionProcess(_config, subId, blProxy, _updateUI);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue