Added button to jump to template editing from profile tab, made TemplateManager IDisposable
This commit is contained in:
@@ -13,7 +13,7 @@ using System.Linq;
|
||||
|
||||
namespace CustomizePlus.Templates;
|
||||
|
||||
public class TemplateManager
|
||||
public class TemplateManager : IDisposable
|
||||
{
|
||||
private readonly SaveService _saveService;
|
||||
private readonly Logger _logger;
|
||||
@@ -41,6 +41,11 @@ public class TemplateManager
|
||||
LoadTemplates();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_reloadEvent.Unsubscribe(OnReload);
|
||||
}
|
||||
|
||||
public Template? GetTemplate(Guid templateId) => _templates.FirstOrDefault(d => d.UniqueId == templateId);
|
||||
|
||||
public void LoadTemplates()
|
||||
|
||||
Reference in New Issue
Block a user