mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 22:07:44 +01:00
Merge pull request #541 from daemitus/asyncstuff
This commit is contained in:
commit
bd48297745
2 changed files with 5 additions and 7 deletions
|
|
@ -391,8 +391,7 @@ namespace Dalamud.Game.Gui
|
||||||
if (!FastByteArrayCompare(originalMessageData, message.RawData))
|
if (!FastByteArrayCompare(originalMessageData, message.RawData))
|
||||||
{
|
{
|
||||||
allocatedString = Service<LibcFunction>.Get().NewString(message.RawData);
|
allocatedString = Service<LibcFunction>.Get().NewString(message.RawData);
|
||||||
Log.Debug(
|
Log.Debug($"HandlePrintMessageDetour String modified: {originalMessageData}({messagePtr}) -> {message}({allocatedString.Address})");
|
||||||
$"HandlePrintMessageDetour String modified: {originalMessageData}({messagePtr}) -> {message}({allocatedString.Address})");
|
|
||||||
messagePtr = allocatedString.Address;
|
messagePtr = allocatedString.Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,7 @@ namespace Dalamud.Plugin.Internal
|
||||||
this.IsThirdParty = pluginMasterUrl != DalamudPluginsMasterUrl;
|
this.IsThirdParty = pluginMasterUrl != DalamudPluginsMasterUrl;
|
||||||
this.IsEnabled = isEnabled;
|
this.IsEnabled = isEnabled;
|
||||||
|
|
||||||
// No need to wait for this
|
this.ReloadPluginMasterAsync();
|
||||||
Task.Run(this.ReloadPluginMasterAsync);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -73,12 +72,12 @@ namespace Dalamud.Plugin.Internal
|
||||||
this.State = PluginRepositoryState.InProgress;
|
this.State = PluginRepositoryState.InProgress;
|
||||||
this.PluginMaster = new List<RemotePluginManifest>().AsReadOnly();
|
this.PluginMaster = new List<RemotePluginManifest>().AsReadOnly();
|
||||||
|
|
||||||
return Task.Run(() =>
|
return Task.Run(async () =>
|
||||||
{
|
{
|
||||||
Log.Information($"Fetching repo: {this.PluginMasterUrl}");
|
Log.Information($"Fetching repo: {this.PluginMasterUrl}");
|
||||||
using var client = new HttpClient();
|
using var client = new HttpClient();
|
||||||
using var response = client.GetAsync(this.PluginMasterUrl).Result;
|
using var response = await client.GetAsync(this.PluginMasterUrl);
|
||||||
var data = response.Content.ReadAsStringAsync().Result;
|
var data = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
var pluginMaster = JsonConvert.DeserializeObject<List<RemotePluginManifest>>(data);
|
var pluginMaster = JsonConvert.DeserializeObject<List<RemotePluginManifest>>(data);
|
||||||
pluginMaster.Sort((pm1, pm2) => pm1.Name.CompareTo(pm2.Name));
|
pluginMaster.Sort((pm1, pm2) => pm1.Name.CompareTo(pm2.Name));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue