Code clean

This commit is contained in:
2dust
2025-08-10 20:12:57 +08:00
parent 925cf16c50
commit 386c86bfa6
9 changed files with 50 additions and 56 deletions
+3 -3
View File
@@ -2106,7 +2106,7 @@ public class ConfigHandler
public static async Task<int> InitBuiltinDNS(Config config)
{
var items = await AppHandler.Instance.DNSItems();
// Check existing DNS items and disable those with empty NormalDNS
var needsUpdate = false;
foreach (var existingItem in items)
@@ -2117,13 +2117,13 @@ public class ConfigHandler
needsUpdate = true;
}
}
// Update items if any changes were made
if (needsUpdate)
{
await SQLiteHelper.Instance.UpdateAllAsync(items);
}
if (items.Count <= 0)
{
var item = new DNSItem()