mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-25 04:16:56 +00:00
fix default server is reset on automatic update subscribe 2
This commit is contained in:
parent
ce635b6071
commit
ebf2c23419
1 changed files with 12 additions and 3 deletions
|
@ -1364,9 +1364,18 @@ namespace v2rayN.Forms
|
|||
if (config.autoUpdateSubscribe)
|
||||
{
|
||||
ShowMsg(UIRes.I18N("StartAutoUpdateSubscribe"));
|
||||
ShowMsg(config.index.ToString());
|
||||
UpdateSubscriptionProcess();
|
||||
SetDefaultServer(config.index);
|
||||
int lastIndex = config.index;
|
||||
void _updateUI(bool success, string msg)
|
||||
{
|
||||
AppendText(false, msg);
|
||||
if (success)
|
||||
{
|
||||
RefreshServers();
|
||||
}
|
||||
SetDefaultServer(lastIndex);
|
||||
};
|
||||
|
||||
(new UpdateHandle()).UpdateSubscriptionProcess(config, _updateUI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue