Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed the bugwhere certain errors could cause work task to termi…
Browse files Browse the repository at this point in the history
…nate
  • Loading branch information
ArchiDog1998 committed Mar 18, 2023
1 parent 3b52bee commit 4aaac8b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Data/IconSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public static TextureWrap GetTexture(uint id)
Task.Run(() =>
{
texture = Service.GetTextureIcon(id);
_textures.Add(id, texture);
_textures[id] = texture;
});
}

if (!_textures.TryGetValue(0, out texture))
{
texture = Service.GetTextureIcon(0);
_textures.Add(0, texture);
_textures[0] = texture;
}
return texture;
}
Expand Down
23 changes: 15 additions & 8 deletions RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,24 @@ private static void UpdateWork()
if (_work) return;
_work = true;

PreviewUpdater.UpdateCastBarState();
TargetUpdater.UpdateTarget();
ActionUpdater.UpdateActionInfo();
try
{
PreviewUpdater.UpdateCastBarState();
TargetUpdater.UpdateTarget();
ActionUpdater.UpdateActionInfo();

RotationUpdater.UpdateRotation();
RotationUpdater.UpdateRotation();

TimeLineUpdater.UpdateTimelineAction();
ActionUpdater.UpdateNextAction();
RSCommands.UpdateRotationState();
TimeLineUpdater.UpdateTimelineAction();
ActionUpdater.UpdateNextAction();
RSCommands.UpdateRotationState();

InputUpdater.UpdateCommand();
InputUpdater.UpdateCommand();
}
catch (Exception ex)
{
PluginLog.Error(ex, "Inner Worker Exception");
}

_work = false;
}
Expand Down

0 comments on commit 4aaac8b

Please sign in to comment.