mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-08 22:49:48 +03:00
Cache when reading embedded resources
This commit is contained in:
@@ -31,14 +31,14 @@ namespace ServiceLib.ViewModels
|
||||
|
||||
ImportDefConfig4V2rayCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
normalDNS = Utils.GetEmbedText(Global.DNSV2rayNormalFileName);
|
||||
normalDNS = EmbedUtils.GetEmbedText(Global.DNSV2rayNormalFileName);
|
||||
await Task.CompletedTask;
|
||||
});
|
||||
|
||||
ImportDefConfig4SingboxCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
normalDNS2 = Utils.GetEmbedText(Global.DNSSingboxNormalFileName);
|
||||
tunDNS2 = Utils.GetEmbedText(Global.TunSingboxDNSFileName);
|
||||
normalDNS2 = EmbedUtils.GetEmbedText(Global.DNSSingboxNormalFileName);
|
||||
tunDNS2 = EmbedUtils.GetEmbedText(Global.TunSingboxDNSFileName);
|
||||
await Task.CompletedTask;
|
||||
});
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace ServiceLib.ViewModels
|
||||
return;
|
||||
}
|
||||
|
||||
var result = Utils.LoadResource(fileName);
|
||||
var result = EmbedUtils.LoadResource(fileName);
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user