mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-19 19:55:00 +03:00
Default to first sub; update SubIndexId on delete
https://github.com/2dust/v2rayN/issues/9151
This commit is contained in:
@@ -1936,6 +1936,12 @@ public static class ConfigHandler
|
||||
await SQLiteHelper.Instance.DeleteAsync(item);
|
||||
await RemoveServersViaSubid(config, id, false);
|
||||
|
||||
if (item.Id == config.SubIndexId)
|
||||
{
|
||||
var subs = await AppManager.Instance.SubItems();
|
||||
config.SubIndexId = subs.LastOrDefault()?.Id;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user